From 09670d6917bbfd27e67b8b82232e2df3c9d88729 Mon Sep 17 00:00:00 2001 From: qiang Date: Mon, 6 Dec 2021 16:30:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20hello-uniapp=20=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20sass=20=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- generator.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/generator.js b/generator.js index fe4ee6a..60598c7 100644 --- a/generator.js +++ b/generator.js @@ -33,6 +33,10 @@ async function generate (dir, files, base = '', rootOptions = {}) { } module.exports = (api, options, rootOptions) => { + const templateWithSass = [ + 'dcloudio/hello-uniapp', + 'dcloudio/uni-template-news' + ] api.extendPackage(pkg => { return { dependencies: { @@ -62,7 +66,7 @@ module.exports = (api, options, rootOptions) => { } } }) - } else if (options.template === 'dcloudio/uni-template-news') { + } else if (templateWithSass.includes(options.template)) { api.extendPackage(pkg => { return { devDependencies: {