-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
实现 webpack 配置拆分 #4
base: master
Are you sure you want to change the base?
Conversation
“当旧项目升级后运行报错时,需要给出清晰的错误提示,引导用户安装相关插件” 个人倾向于无感升级,而不是报错引导手工安装。「把复杂留给框架,把简单留给使用者」 |
无感升级需要自动安装依赖包,容易出错,这个操作还是给开发者吧 |
我个人也倾向于让开发者手动安装依赖包,但在「适配策略」上我们可以做得更多: |
支持 |
|
node-sass 是挺麻烦的,这个方案好了以后就可以随心配置了 |
相当于webpack插件的微服务化,这里的每个拆分出来的插件有没有版本的概念?如果旧项目用的sass是1.0,升级插件sass版本是2.0的话,会有兼容性问题 |
支持。 |
哈哈哈,讨论好激烈,我先回复几点~ |
@luckyadam 你说的是在 sass 文件里使用 |
嗯嗯,是这种情况,当时测试的 |
Dart Sass on Node is still substantially slower than on the Dart VM 替换也行, 建议新增 @tarojs/plugin-node-sass 毕竟二者在下载量上还有 300 倍差距 https://www.npmtrends.com/dart-sass-vs-node-sass |
完整提案请看:
https://github.com/NervJS/taro-rfcs/blob/split-webpack-config/rfcs/0000-split-webpack-config.md