webpack-glsl-loader icon indicating copy to clipboard operation
webpack-glsl-loader copied to clipboard

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

Open TheLarkInn opened this issue 7 years ago • 1 comments

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!

TheLarkInn avatar Apr 04 '18 01:04 TheLarkInn

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).

TheLarkInn avatar Apr 08 '18 19:04 TheLarkInn