Rollup code splitting question relating to Vite/WXT #1352
-
Since this project uses Vite, which relies on Rollup to build, I'm wondering if the issue described here is somehow resolved/mitigated in WXT: rollup/rollup#2756 I also came across this issue, but wasn't sure if it's entirely related: #357 Also, from the issue I referenced in Rollup, it seemed like these problems do not exist in Webpack. Can someone confirm/deny if this is the case? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
WXT works around this by using multiple builds with a single input each instead of a single build with multiple inputs. #357 is related to enabling code splitting for content scripts. Each content script is built individually, preventing any code from being shared. That issue would add the ability to code-split content scripts and share chunks with other ESM entrypoints (like HTML pages). |
Beta Was this translation helpful? Give feedback.
No, each content script is built individually, bundled into the IIFE format.
You can see the build steps in WXT's CLI:
If you want to know the specifics of what types of entrypoints are grouped together into a single build vs what a…