Closed debpalash closed 1 year ago
@crxjs/vite-plugin
version 1 does not support vite
version 3. Try using @crxjs/vite-plugin
version 2 beta (released yesterday)
@crxjs/vite-plugin
version 1 does not supportvite
version 3. Try using@crxjs/vite-plugin
version 2 beta (released yesterday)
Th
This one seems to already be reported here https://github.com/crxjs/chrome-extension-tools/issues/535
For now you can try using vite@3.1.7
and see if you have any issues there
I can confirm this errors still occurs with vite 3.1.7
The peer deps problem should be fixed in the current beta release (v2.0.0-beta.2):
npm i -D @crxjs/vite-plugin@beta
I cannot reproduce this bug with CRXJS@2.0.0-beta.4 and Vite@3.2.2.
Getting the same issue using:
vite@4.2.2 @crxjs/vite-plugin@2.0.0-beta.16
Having the same issue as well.
"@crxjs/vite-plugin": "^1.0.14", "vite": "^2.9.15"
The same problem.
"vite": "^4.4.5" "@crxjs/vite-plugin": "2.0.0-beta.18"
Same problem here
"vite": "^5.0.8" "@crxjs/vite-plugin": "2.0.0-beta.21"
This is the error that arises if you load the root folder of your project (i.e. the folder containing vite.config.js
as the Chrome extension) - this is an easy mistake to make, what you really want to do is load the generated dist
folder.
When you load the root folder, index.html
will include something like:
<script type="module" src="/src/main.tsx"></script>
Which will load the file directly from the Chrome extension folder - and Chrome by default will serve it as a plaintext file.
so how to load it?
Try loading the dist
folder?
That's how my code was
I tried doing it like this. /dist/src/main.jsx
but it's giving file not found error.
I also tried like this
dist/src/main.jsx
@danielkleinstein This is the folder that I am trying to load as chrome extension load unpacked option.
Try removing the /dist
prefix from your include
The initial code is without the dist but it gives error of MIME type.
Build tool
Vite
Where do you see the problem?
Describe the bug
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.
Reproduction
install using docs instruction
Logs
No response
System Info
Severity
blocking all usage of RPCE