Skip to content
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

停止每个页面注入variables.scss来减少体积 #1689

Closed
jasper-ops opened this issue Sep 22, 2022 · 1 comment
Closed

停止每个页面注入variables.scss来减少体积 #1689

jasper-ops opened this issue Sep 22, 2022 · 1 comment
Assignees
Labels
help wanted 问题求助

Comments

@jasper-ops
Copy link

你建议我们做什么?

目前绝大部分的做法是在配置文件配置注入variables.scss
@import "@nutui/nutui-taro/dist/styles/variables-jdt.scss";
在这个文件内也导入了动画的代码,导致每个页面都存在相同的动画代码,
体积成倍增长,当然也不是要停止注入,而是不要注入动画的代码。

如果让开发者自己在app.scss内import动画的scss

它将使编译出来的项目只有app.wxss内存在一份公用的动画代码,而不会每个页面都存在

其它

需要注意的是如果使用css module可能会导致动画存在问题

@jasper-ops jasper-ops added the help wanted 问题求助 label Sep 22, 2022
@richard1015 richard1015 self-assigned this Sep 23, 2022
@richard1015
Copy link
Member

可以先采用 测试包 v3.2.3-beta.1 https://www.npmjs.com/package/@nutui/nutui-taro/v/3.2.3-beta.1

正式包 v3.2.3 本周四 9.29~30 发布

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted 问题求助
Projects
None yet
Development

No branches or pull requests

3 participants