Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nuxt-modules/tailwindcss
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.0.0
Choose a base ref
...
head repository: nuxt-modules/tailwindcss
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.0.1
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Mar 14, 2022

  1. Copy the full SHA
    fed1c31 View commit details

Commits on Mar 15, 2022

  1. Copy the full SHA
    bac29b4 View commit details
  2. chore(release): 5.0.1

    danielroe committed Mar 15, 2022
    Copy the full SHA
    f93d50c View commit details
Showing with 797 additions and 1,396 deletions.
  1. +8 −0 CHANGELOG.md
  2. +1 −1 package.json
  3. +7 −11 src/module.ts
  4. +781 −1,384 yarn.lock
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [5.0.1](https://github.com/nuxt-community/tailwindcss-module/compare/v5.0.0...v5.0.1) (2022-03-15)


### Bug Fixes

* append to postcss options and use new nuxt 3 schema ([#437](https://github.com/nuxt-community/tailwindcss-module/issues/437)) ([fed1c31](https://github.com/nuxt-community/tailwindcss-module/commit/fed1c311a0b6ea4f7d37d5367ceedd2d36e84ab9))
* enable `postcss-nesting` by default ([bac29b4](https://github.com/nuxt-community/tailwindcss-module/commit/bac29b4c59acd06dc7a4ba6a7440105131de49c7))

## [5.0.0](https://github.com/nuxt-community/tailwindcss-module/compare/v5.0.0-4...v5.0.0) (2022-03-08)


2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nuxtjs/tailwindcss",
"version": "5.0.0",
"version": "5.0.1",
"description": "TailwindCSS module for Nuxt",
"repository": "nuxt-community/tailwindcss-module",
"license": "MIT",
18 changes: 7 additions & 11 deletions src/module.ts
Original file line number Diff line number Diff line change
@@ -94,20 +94,16 @@ export default defineNuxtModule({

// Setup postcss plugins
// https://tailwindcss.com/docs/using-with-preprocessors#future-css-features
const postcssPlugins = {
'postcss-nesting': {},
'postcss-custom-properties': {},
tailwindcss: tailwindConfig
}
const postcssOptions =
nuxt.options.postcss || /* nuxt 3 */
nuxt.options.build.postcss.postcssOptions || /* older nuxt3 */
nuxt.options.build.postcss as any
postcssOptions.plugins['tailwindcss/nesting'] = postcssOptions.plugins['tailwindcss/nesting'] ?? 'postcss-nesting'
postcssOptions.plugins['postcss-custom-properties'] = postcssOptions.plugins['postcss-custom-properties'] ?? {}
postcssOptions.plugins.tailwindcss = tailwindConfig

if (isNuxt2()) {
const postcssOptions = nuxt.options.build.postcss as any
postcssOptions.plugins = defu(postcssOptions.plugins, postcssPlugins)
await installModule('@nuxt/postcss8')
} else {
const postcssOptions = nuxt.options.build.postcss.postcssOptions
postcssOptions.plugins = postcssOptions.plugins || {}
postcssOptions.plugins = defu(postcssOptions.plugins, postcssPlugins)
}

// Add _tailwind config viewer endpoint
Loading