Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Output ES2015 module format #3

Closed
nathanosdev opened this issue May 16, 2017 · 0 comments
Closed

Output ES2015 module format #3

nathanosdev opened this issue May 16, 2017 · 0 comments

Comments

@nathanosdev
Copy link
Owner

nathanosdev commented May 16, 2017

Outputting ES2015 format would allow for projects importing this library to perform tree-shaking, removing any modules/components that they're not actually using.

At the moment, this isn't possible with Webpack but webpack/webpack#2933 is tracking the progress of its implementation.

It seems to be moving slowly, so depending on whether or not it actually gains traction, this project might need to move to another build system.

If it is implemented, the project should output 2 Webpack builds in parallel.

module.exports = [
  Merge(CommonConfig, {
    output: {
      filename: '[name].umd.js',
      libraryTarget: 'umd'
    }
  }),
  Merge(CommonConfig, {
     output: {
       filename: '[name].module.js',
       libraryTarget: 'es2015'
     }
   })
];
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant