]> _ Git - pmi.git/commitdiff
Tweaks to PurgeCSS for production builds. WIP #2731 @1
authorStephen Cameron <stephen@cubedesigners.com>
Wed, 4 Sep 2019 18:40:09 +0000 (20:40 +0200)
committerStephen Cameron <stephen@cubedesigners.com>
Wed, 4 Sep 2019 18:40:09 +0000 (20:40 +0200)
resources/styles/components/search.styl
resources/styles/components/vue-slider.styl
webpack.mix.js

index 8222441e7c3a474c3f4654aef003046c85865b55..6bb48d854d89ee19db45d08c01e9494cdaf7b237 100644 (file)
@@ -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 */
index db21b978381e160098237ff72ff6984b1465910d..607622728a02847acc9b5f6516efd3a849459c64 100644 (file)
@@ -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 */
index 8188299a4904f798b92af08a78de300cf8a08935..f862eeacf909a0aa2113e9faf6053d3e04b2cb7f 100644 (file)
@@ -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');