Skip to content

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

Open
TheLarkInn wants to merge 1 commit intogrieve:masterfrom
TheLarkInn:patch-1
Open

feat(esm): convert loader to generate esm module statements#4
TheLarkInn wants to merge 1 commit intogrieve:masterfrom
TheLarkInn:patch-1

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