i am using the @crxjs/vite-plugin to build my project with vite4.1.4 however i noticed that when running the devServer all ES6 modules imported into the project are not singleton preventing me from maintaining state within the module.
i have tested building the project with npm run build, and this issue does not occur in the production build
tried using different vite config and plugin options but issue persists
this problem prevents me from using this plugin in my projects, and i would appreciate any help in fix it.
Build tool
Vite
Where do you see the problem?
Describe the bug
i am using the @crxjs/vite-plugin to build my project with vite4.1.4 however i noticed that when running the devServer all ES6 modules imported into the project are not singleton preventing me from maintaining state within the module.
i have tested building the project with npm run build, and this issue does not occur in the production build tried using different vite config and plugin options but issue persists
this problem prevents me from using this plugin in my projects, and i would appreciate any help in fix it.
Reproduction
https://github.com/KspTooi/my-chrome-ext
Logs
No response
System Info
Severity
blocking all usage of RPCE