Vite React Ts how to build Extension #704
Unanswered
michal-mazurkiewicz
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I am building chrome extension with vite, react Ts and crxjs. The way it works is that on icon click content script injects iframe element into webpage with the
`iframe.src = chrome.runtime.getURL("");
Everything works perfect in the development mode but once I run
npm run build
the dist folder contains not transpailed typescript files and the extension doesnt work. Iframe is not injected after icon click and service worker logs this error:caught (in promise) Error: Could not establish connection. Receiving end does not exist.
Thank you for help!
Beta Was this translation helpful? Give feedback.
All reactions