From 8cd20767587260f2265f01072302dc867be01b33 Mon Sep 17 00:00:00 2001 From: Rahul Kadyan Date: Thu, 11 Apr 2019 09:57:52 +0530 Subject: [PATCH] fix(#84): Move postcss-modules plugins to last --- src/compiler.ts | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index 42ed177..a8bbc29 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -229,22 +229,24 @@ export class SFCCompiler { style.module === true || typeof style.module === 'string' const needsCleanCSS = this.template.isProduction && !(this.style.postcssCleanOptions && this.style.postcssCleanOptions.disabled) - const postcssPlugins = [ - needsCSSModules - ? postcssModules({ - generateScopedName: '[path][local]-[hash:base64:4]', - ...this.style.postcssModulesOptions, - getJSON: (t: any) => { - tokens = t - } - }) - : undefined, - needsCleanCSS - ? postcssClean(this.style.postcssCleanOptions) - : undefined - ] - .concat(this.style.postcssPlugins) + const postcssPlugins = (this.style.postcssPlugins || []) + .slice() + .concat([ + needsCleanCSS + ? postcssClean(this.style.postcssCleanOptions) + : undefined, + needsCSSModules + ? postcssModules({ + generateScopedName: '[path][local]-[hash:base64:4]', + ...this.style.postcssModulesOptions, + getJSON: (t: any) => { + tokens = t + } + }) + : undefined, + ]) .filter(Boolean) + const preprocessOptions = (style.lang && this.style.preprocessOptions && pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy