mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-05 11:57:13 +00:00
make sure that tailwind has access to the AST
It's better to run this plugin first so Tailwind can operate on a single set of CSS after the imports have been inlined, like mentioned in the postcss-import documentation: > This plugin should probably be used as the first plugin of your list. This way, other plugins will work on the AST as if there were only a single file to process, and will probably work as you can expect. If you tried to @import any CSS file that was using Tailwind features like @responsive, this setup wouldn't work because Tailwind wouldn't see that code, it would only see an @import line. You want all of the imports inlined before running any other plugins.
This commit is contained in:
parent
292c02eb64
commit
f75a7e3dee
@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('tailwindcss')('./tailwind.js'),
|
||||
require('postcss-import'),
|
||||
require('tailwindcss')('./tailwind.js'),
|
||||
require('autoprefixer')
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user