Replies: 1 comment
-
Yea, we've been going back and forth on whether we ship @Xerios if you're interested in changing this default behavior and adding the new splitting option, we'd love a PR! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
One of the issues I've encountered while using the new experimental optimize feature is that the bundled build tends to create a shared file which is used by all entrypoints that require it.
This isn't a bad thing, but in my case, where I'm bundling one main.js file and a webworker, the webworker should be self-contained.
Adding imports breaks FireFox compatibility since they don't support modules yet ( it gives the error:
import declarations may only appear at top level of a module worker
)Setting splitting: false inside optimize.ts fixes my issue, and avoids including any imports inside of my webworker.
Perhaps this should be a setting alongside with other optimize options?
Beta Was this translation helpful? Give feedback.
All reactions