vite2 打包组件库时怎样内联样式? #2606
Unanswered
ZeronoFreya
asked this question in
Q&A
Replies: 1 comment 2 replies
-
楼主解决了吗? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
vite.config.js
打包之后生成了单独的style.css,我看文档上有写当cssCodeSplit启用时,在异步 chunk 中导入的 CSS 将内联到异步 chunk 本身,并在块加载时插入。但引入组建后样式很明显丢失了,我不得不在样式中手动导入:@import url("../../dist/style.css");
是我哪里理解错了吗?
Beta Was this translation helpful? Give feedback.
All reactions