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

Include ES6 modules in the distribution package #271

Open
arkaitzgarro opened this issue Dec 7, 2018 · 2 comments
Open

Include ES6 modules in the distribution package #271

arkaitzgarro opened this issue Dec 7, 2018 · 2 comments

Comments

@arkaitzgarro
Copy link
Contributor

We export our modules as a single UMD, which works just fine, but adds an extra boilerplate and makes it complicated to perform some tree shaking with webpack or rollup.

Including the original ES6 source code and adding the module property to our package.json files should do the trick: https://github.com/dherman/defense-of-dot-js/blob/master/proposal.md#typical-usage

@seelts
Copy link

seelts commented Aug 28, 2019

That will do the trick, but I would say we can do better.

Concord repository is about libraries.
And I believe libraries should be small.
We can at least minify them.

So, instead of just publishing source code, we can create a new webpack bundle which minifies/uglifies/ and outputs es6 modules.

@arkaitzgarro
Copy link
Contributor Author

Indeed, my idea is not only publish the source code, but also a minified UMD compatible version. Something like that:

{
  ...,
  "main": "dist/index.js",
  "module": "src/index.js",
  ...
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants