fix: hello-uniapp 模板增加 sass 插件

This commit is contained in:
qiang 2021-12-06 16:30:50 +08:00
parent 49d772e3d0
commit 09670d6917

View File

@ -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: {