Open farazshuja opened 1 year ago
I believe this is fixed in @crxjs/vite-plugin
v2.0. It's in beta right now, you can test it using:
npm i @crxjs/vite-plugin@beta -D
I can confirm that it's working as expected in v2
apart from broken HMR for ?inline
imports #600
This might be related, but the HMR doesn't work for css/sass modules either when they're declared like:
import styles from "component.module.scss
export default function Component() {
return (<div className={styles.helloWorld}>
<h2>Hello World</h2>
</div>);
}
Build tool
Vite
Where do you see the problem?
Describe the bug
As per vite docs
This is not working when using the crxjs plugin. In my code I have like
But its still adding the css to Head section when running
yarn dev
I needed this so I can add the css by manually inside the shadow-dom to avoid collision with the global scope for css libs.Reproduction
https://github.com/farazshuja/chrome-extension-vite-vue-starter-template/blob/0b56f5e3e2c7b2bbda61337ac107c496c0097f61/src/contentScripts/index.ts#L4-L5
Logs
No response
System Info
Severity
annoyance