From: Stephen Cameron Date: Tue, 14 Jan 2020 10:23:48 +0000 (+0100) Subject: Fix regression in configuration that caused colours to be wrong in generated CSS... X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=1983a2a115bc0db3a199e4eed51ca479496cc712;p=pmi.git Fix regression in configuration that caused colours to be wrong in generated CSS. Done #3321 @0.5 --- 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({