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

vite怎么才能分离出css呢 #11629

Closed
7 tasks done
qiuzongyuan opened this issue Jan 7, 2023 · 1 comment
Closed
7 tasks done

vite怎么才能分离出css呢 #11629

qiuzongyuan opened this issue Jan 7, 2023 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@qiuzongyuan
Copy link

qiuzongyuan commented Jan 7, 2023

Describe the bug

这是我的问题demo工程

https://github.com/qiuzongyuan/build-demo

现在的打包出会把所有的 css 打进 style.css(lib文件夹下)

我应该用什么配置或者插件可以把css分离出来呢?

例如

|-- lib
   |--text
      |-- text.vue.js
      |-- style.css

text.vue.js 能引入 style.css

或者直接把 style.css 注入至 text.vue.js 也是可以

总之,不希望把所有组件的样式打包至 style.css

Reproduction

https://github.com/qiuzongyuan/build-demo

Steps to reproduce

yarn install

npm run build

System Info

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red
Copy link
Member

Duplicate of #4345

@sapphi-red sapphi-red marked this as a duplicate of #4345 Jan 8, 2023
@sapphi-red sapphi-red closed this as not planned Won't fix, can't repro, duplicate, stale Jan 8, 2023
@sapphi-red sapphi-red added duplicate This issue or pull request already exists and removed pending triage labels Jan 8, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants