// });
//=== Stylus / PostCSS
+// Since we have different configurations for Tailwind,
+// the PostCSS options need to be specified differently
+// due to a limitation in Laravel Mix.
+// Ref: https://github.com/tailwindcss/tailwindcss/issues/494
+// Ref: https://sandulat.com/blog/multiple-tailwind-configs-in-laravel/
mix.stylus('resources/styles/app.styl', 'public/css', {
- use: [
- require('rupture')()
- ]
-}).options({
- postCss: [
+ use: [
+ require('rupture')()
+ ]
+ },
+ [ // postCssPlugins
tailwindcss('tailwind.config.js'),
require('lost'),
- ],
+ ]
+ ).options({
// autoprefixer: {
// options: {
// grid: true, // Enable CSS grid prefixes for IE
});
mix.stylus('resources/styles/michsci.styl', 'public/css', {
- use: [
- require('rupture')()
- ]
-}).options({
- postCss: [
+ use: [
+ require('rupture')()
+ ]
+ },
+ [ // postCssPlugins
tailwindcss('tailwind-michsci.config.js'),
require('lost'),
- ],
-});
+ ]
+);
//=== PurgeCSS to remove unused selectors
mix.purgeCss({