IssueRaiser

Can css be styleInjected in library mode?

**Is your feature request related to a problem? Please describe.** I'm using vite to build a library, and sometimes the library requires a dozen lines of simple styles. After building, a style.css file will be generated. But I think it is not necessary to generate two files, it may be enough to generate only one file. Is there any way to add style.css to the target js file? The styleInject helper function is used in rollup and babel plug-ins. In iife/umd mode, the style is automatically injected when library loaded. ![image](https://user-images.githubusercontent.com/16471930/104901710-b2969680-59b8-11eb-9b4d-b0c617083fc4.png)

Posted by gwsbhqt on Jan 18, 2021, 10:13 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments

github (Other)

Can css be styleInjected in library mode?

gwsbhqtJan 18, 2021, 10:13 AM

**Is your feature request related to a problem? Please describe.** I'm using vite to build a library, and sometimes the library requires a dozen lines of simple styles. After building, a style.css file will be generated. But I think it is not necessary to generate two files, it may be enough to generate only one file. Is there any way to add style.css to the target js file? The styleInject helper function is used in rollup and babel plug-ins. In iife/umd mode, the style is automatically injected when library loaded. ![image](https://user-images.githubusercontent.com/16471930/104901710-b2969680-59b8-11eb-9b4d-b0c617083fc4.png)

Comments (0)

No comments yet. Start the discussion.

Comment on this issue