-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rest 1/2 of Disable dynamic import wrapper __vite__injectQuery #16678
Comments
Unfortunately we cannot simply skip injecting |
@sapphi-red why not? now VITE is bipolar: on build you got one result, and on running dev - different You can jump into my sample repo and check why is it important, at least for my existing (and prod) case
|
The problem is that I don't manage the file connection/importanation and The whole script runs in the "service-worker" (background.js) file where I can't use dynamic loading of files and then the TEXT (directory path for example) goes to the chrome tab where I can't DIRECTLY take the file from the extension's local path as required by the CHROME API because I believe this text above is hard to understand, once again:
I have tried:
and I have seen the trying path at console log and I believe |
Description
Reopen #16241 issue, because only 1/2 is solved for me / for my user case..
The problem is gone but only when I'm running
npm run build
, and the build version is going good (Thanks @bluwy), but if I running the same code but usingsnpm run dev
(renamed tostart
in my sample project, which attached below)Suggested solution
In both cases, vite should skip adding the compiler wrapper (
__vite__injectQuery
) if this is indicated by a special comment:/* @vite-ignore */
Alternative
undo #16556 (ha ha)
Additional context
Repo: https://github.com/b5414/sample // attention to
src\rendered\assets\background_modules.js:21
To see the issue, just open the console (
ctrl + shift + i
orf12
) of opened google dot com window by extension with S iconbuild
- you will see:test info: <Module>
start
- you will see:test err: bla bla bla __vite__injectQuery undefined
Validations
The text was updated successfully, but these errors were encountered: