From: Stephen Cameron Date: Wed, 4 Sep 2019 18:40:09 +0000 (+0200) Subject: Tweaks to PurgeCSS for production builds. WIP #2731 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=21eaf4e1b8f7ffdb6e7f6c13b7632eaac2514861;p=pmi.git Tweaks to PurgeCSS for production builds. WIP #2731 @1 --- diff --git a/resources/styles/components/search.styl b/resources/styles/components/search.styl index 8222441..6bb48d8 100644 --- a/resources/styles/components/search.styl +++ b/resources/styles/components/search.styl @@ -31,6 +31,7 @@ $breakpoint-search-results = 980px //== Autocomplete field +/*! purgecss start ignore */ .autocomplete @apply flex-grow @@ -63,3 +64,5 @@ $breakpoint-search-results = 980px &:hover, &[aria-selected=true] @apply bg-grey-100 cursor-pointer + +/*! purgecss end ignore */ diff --git a/resources/styles/components/vue-slider.styl b/resources/styles/components/vue-slider.styl index db21b97..6076227 100644 --- a/resources/styles/components/vue-slider.styl +++ b/resources/styles/components/vue-slider.styl @@ -1,5 +1,8 @@ // Theme for vue-slider component // Adapted from https://github.com/NightCatSama/vue-slider-component/blob/master/lib/theme/default.scss +// Via http://sass2stylus.com/ + +/*! purgecss start ignore */ $themeColor = #6b7287 $disabledOpacity = 0.5 @@ -145,3 +148,5 @@ arrow($size, $color) transition: all 0.3s &-show opacity: 1 + +/*! purgecss end ignore */ diff --git a/webpack.mix.js b/webpack.mix.js index 8188299..f862eea 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -45,7 +45,9 @@ mix.js('resources/js/app.js', 'public/js') globs: [ path.join(__dirname, 'vendor/cubist/**/*.php'), // Some classes (eg. nav) might be present only here ], - whitelistPatterns: [/grid-.*/], // Don't purge the grid-* custom classes since they can be used dynamically + // Don't purge the grid-* custom classes since they can be used dynamically + // Also protect MMenu classes + whitelistPatterns: [/mm.*/, /grid-.*/], }); mix.js('resources/js/mailform.js', 'public/js');