From 1983a2a115bc0db3a199e4eed51ca479496cc712 Mon Sep 17 00:00:00 2001 From: Stephen Cameron Date: Tue, 14 Jan 2020 11:23:48 +0100 Subject: [PATCH] Fix regression in configuration that caused colours to be wrong in generated CSS. Done #3321 @0.5 --- webpack.mix.js | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/webpack.mix.js b/webpack.mix.js index 5002432..a6d6bca 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -41,15 +41,21 @@ mix.js('resources/js/app.js', 'public/js') // }); //=== 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 @@ -58,15 +64,15 @@ mix.stylus('resources/styles/app.styl', 'public/css', { }); 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({ -- 2.39.5