Tree-shaking Improvements #8765
bigtimebuddy
started this conversation in
RFC
Replies: 1 comment 2 replies
-
@bigtimebuddy Hey, I wasn't sure where to ask this, so I'm posting it here: |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@Zyie had a proposal awhile ago, that I'm reconsidering for v7.
Rollup has an option
preserveModules
which would maintain individual files upon export. There are a few benefits to this approach instead of bundling into a single file. It's faster to build but more importantly helps end-user with tree-shaking (removing unused code).With the exception of the browser builds (pixi.js and pixi.js-legacy and @pixi/webworker), all code would be exported without minifying. Types generation would also be faster/easier to export as individual files.
Every file in the source would likely get an export that looks something like this:
Beta Was this translation helpful? Give feedback.
All reactions