I've a question... I can't generate correctly my extension using crxjs plugin... when I trying to submit my zip generated after running npm run build, later I can't view my extension running correctly.
I'm actually using React, Vite and CRXJS plugin.
Can you help me to publish my extension? I'm trying to publish it for my actually company...
Then in the dist folder, if you check service-worker-loader.js, you will see your background script imported there. I have only tested it in the dev command, not sure if extra set up is needed for production build.
I have an error with the dynamic import of a content script in background script.
I'm trying to do :
import myScript from './content?script' but i get a compilation error as well as "Cannot find module './content?script' or its corresponding type declarations.ts(2307)"
I've a question... I can't generate correctly my extension using crxjs plugin... when I trying to submit my zip generated after running
npm run build, later I can't view my extension running correctly.I'm actually using React, Vite and CRXJS plugin.
Can you help me to publish my extension? I'm trying to publish it for my actually company...
The best way to get support is to start a discussion on GitHub:
github.com/crxjs/chrome-extension-...
See you there!
Do you have an github example project for this?
Check out this devtools extension starter:
github.com/jacksteamdev/crx-react-...
how to implement/create a background script?
From my understanding, you will just need to specify your background script in your manifest file. Something like
Then in the dist folder, if you check
service-worker-loader.js, you will see your background script imported there. I have only tested it in the dev command, not sure if extra set up is needed for production build.This is exactly correct! No extra setup needed for production.
this will work perfectly?
Very nice!
I have an error with the dynamic import of a content script in background script.
I'm trying to do :
import myScript from './content?script' but i get a compilation error as well as "Cannot find module './content?script' or its corresponding type declarations.ts(2307)"
How do i solve it ?
i have a question
how do I handle this in typescipt, the content has to be in tsx in typescript whats the hack i can use.
i.e content.tsx.
How can we dynamically add and remove CSS files?
import mainWorld from './main-world?script&module'I don't think the
scriptandmoduleparams are a Vite feature. I guess it's handled by the CRX plugin?