From f75a7e3dee6086941b5aacb02648f50699a51497 Mon Sep 17 00:00:00 2001 From: dotnetCarpenter Date: Mon, 13 Nov 2017 19:18:22 +0100 Subject: [PATCH] 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. --- examples/tailwindcss/postcss.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tailwindcss/postcss.config.js b/examples/tailwindcss/postcss.config.js index b10687cd68..693ceda9ef 100644 --- a/examples/tailwindcss/postcss.config.js +++ b/examples/tailwindcss/postcss.config.js @@ -1,7 +1,7 @@ module.exports = { plugins: [ - require('tailwindcss')('./tailwind.js'), require('postcss-import'), + require('tailwindcss')('./tailwind.js'), require('autoprefixer') ] }