create-vite-plugin-web-extension
create-vite-plugin-web-extension copied to clipboard
How to import element-plus css in a content script
content_scripts: [
{
css:["../node_modules/element-plus/dist/index.css"],
js: ["src/entries/contentScript/primary/main.ts"],
matches: [ "https://mp.weixin.qq.com/*", "https://mmbiz.qpic.cn/*" ],
},
],
Is your node_modules directory actually one directory above your vite config? You could try defining a css file and importing the node_modules file within it. It's likely the plugin isn't resolving an input defined like that correctly.