guocaoyi / create-chrome-ext

🍺 Scaffolding your Chrome extension! Boilerplates: react \ vue \ svelte \ solid \ preact \ alpine \ lit \ stencil \ inferno \ vanilla
MIT License
1.64k stars 118 forks source link

content_scripts 里面如何引入 css ? #38

Open twoer opened 1 year ago

twoer commented 1 year ago

我在 manifest 里面按照以下方式配置,发现无效。

content_scripts: [ { "matches": ["https://juejin.cn/*"], js: ['src/content/index.ts'], css: ['src/content/index.css'], }, ],

gradywetherbee commented 11 months ago

Add your css file's path to "web_accessible_resources" and you should be good to go.

Source: https://stackoverflow.com/questions/11553600/how-to-inject-css-using-content-script-file-in-chrome-extension

mordechaim commented 5 months ago

CSS changes still won't trigger a auto refresh.