fix(taro-cli): 修复小程序端非生产模式下不应用 csso 配置问题 close #3622 #3623
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
这个 PR 做了什么? (简要描述所做更改)
修复小程序端非生产模式(dev)下,配置了 csso 但是不能应用的问题。
这个 PR 是什么类型? (至少选择一个)
这个 PR 满足以下需求:
这个 PR 涉及以下平台:
理论上这个 PR 可以应用到所有小程序端
其它需要 Reviewer 或社区知晓的内容:
测试步骤
测试用例
app.scss
如下:dev 模式使用命令
~/Projects/Test/taro/packages/taro-cli/bin/taro build --type weapp --watch
prod 模式使用命令
~/Projects/Test/taro/packages/taro-cli/bin/taro build --type weapp
taro init 一个使用 default 模版的项目
config/index.js
使用默认配置保持不变config/dev.js
为默认,如下:3.1
app.wxss
结果:config/dev.js
配置,启用 csso,如下:4.1
app.wxss
结果:config/dev.js
配置,启用 csso,并配置 compress 选项,如下:5.1
app.wxss
结果:config/prod.js
为默认,如下:6.1
app.wxss
结果: