We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
很多 ui 库都自动在组件的 index.js 入口文件引入了自身的 css 样式:
index.js
// Button/index.js export { default as Button } from './button' import './button.css'
vite 不管是在 dev 还是 build 模式下都不会对 css 进行 tree shaking 处理。
让 css 文件跟 js 文件根据 sideEffects 保持一致的 tree shaking 行为。
sideEffects
No response
ant-design/ant-design-mobile#4966 #4389 (comment)
The text was updated successfully, but these errors were encountered:
Duplicate of #4389
Sorry, something went wrong.
import { Button } from 'antd-mobile' ↓↓↓↓↓↓↓↓↓ import Button from 'antd-mobile/Button '
如果使用 babel-plugin-import 的方式进行“按需加载”,项目复杂的话 optimize 会一直更新:
babel-plugin-import
导致项目无法正常启动:
希望帮忙提供一些解决思路。
No branches or pull requests
Clear and concise description of the problem
很多 ui 库都自动在组件的
index.js
入口文件引入了自身的 css 样式:vite 不管是在 dev 还是 build 模式下都不会对 css 进行 tree shaking 处理。
Suggested solution
让 css 文件跟 js 文件根据
sideEffects
保持一致的 tree shaking 行为。Alternative
No response
Additional context
ant-design/ant-design-mobile#4966
#4389 (comment)
Validations
The text was updated successfully, but these errors were encountered: