diff --git a/template/base/project.config.json b/template/base/project.config.json index dfbb933..7f260aa 100644 --- a/template/base/project.config.json +++ b/template/base/project.config.json @@ -41,7 +41,7 @@ "disableUseStrict": false, "minifyWXML": true, "showES6CompileOption": false, - "useCompilerPlugins": false, + "useCompilerPlugins": ["less", "sass"], "ignoreUploadUnusedFiles": true }, "compileType": "miniprogram", diff --git a/template/javascript/build.js b/template/javascript/build.js index d60790e..223158c 100644 --- a/template/javascript/build.js +++ b/template/javascript/build.js @@ -125,7 +125,7 @@ async function dev() { return; } - if (/\.css$/.test(filePath)) { + if (/\.css|.less|.scss$/.test(filePath)) { processStyle(filePath); return; } @@ -161,7 +161,7 @@ async function prod() { return; } - if (/\.css$/.test(filePath)) { + if (/\.css|.less|.scss$/.test(filePath)) { processStyle(filePath); return; }