Skip to content
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

feat(esm): convert loader to generate esm module statements #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TheLarkInn
Copy link

This converts module.exports = to export default which will allow webpack to scope hoist and better tree shake libs like threeJS

Before analysis:
image

After change analysis:
image

Note that many more modules are concatenated together because they are using esm syntax. This enables faster runtimes and smaller bundles!

This converts `module.exports =` to `export default` which will allow webpack to scope hoist and better tree shake libs like threeJS
@TheLarkInn
Copy link
Author

Ping @grieve!! Do you think this is a safe change to make? I guess the only caveat is that it would be a breaking change for webpack 1 users (however I don't see that as a huge problem).

@grieve grieve self-assigned this Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants