webpack-glsl-loader
webpack-glsl-loader copied to clipboard
feat(esm): convert loader to generate esm module statements
This converts module.exports = to export default which will allow webpack to scope hoist and better tree shake libs like threeJS
Before analysis:

After change analysis:

Note that many more modules are concatenated together because they are using esm syntax. This enables faster runtimes and smaller bundles!
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).