Skip to content

How to use createShadowRootUi and CSS imports #636

Answered by aklinker1
zuozuomuxi asked this question in Q&A
Discussion options

You must be logged in to vote

No worries if you don't have a separate CSS file. If you use modules or import them inside components, it will just work during development, no additional changes required... If you're not seeing that, can you share a zip of your project for me to debug?

Right now, during development and production, content scripts are bundled into a single JS file. CSS, regardless of how it's generated/included/imported, should also be output to a single file. Then that file is fetched as text and added inside the shadow root, during development and production.

I'm working on an ESM version of content scripts that will skip the bundle step during development, and move the styles into the shadow root, but…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@zuozuomuxi
Comment options

@aklinker1
Comment options

Answer selected by zuozuomuxi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants