-
Notifications
You must be signed in to change notification settings - Fork 213
Skip content script loader during build if it has no imports #996
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
Comments
This is an automated message. Please do not reply to this comment. |
related: #946 (comment) |
@Toumash Can you elaborate? I mean, if what you're suggesting is that implementing this feature goes against some of the following
then I don't really think that's the case, because
Therefore I believe this feature aligns with @jacksteamdev's view. How do you see it Toumash? |
I agree you you, i just wanted to have the issue linked with similiar effor that i've already seen. |
Describe the problem
Content script loader prevents the content script from running synchronously in production even if there are no imports.
Describe the proposed solution
Title pretty much says it all, I've seen samrum/vite-plugin-web-extension do this. If the content script doesn't import anything, then I think the loader should be unnecessary in build. In dev, I believe it's still needed for HMR.
Alternatives considered
Do this manually in userland, i.e. write a CrxPlugin that finds the path to the actual content script (which the content script loader imports) and rewrite the manifest to point to it directly
Importance
would make my life easier
The text was updated successfully, but these errors were encountered: