automerge-classic icon indicating copy to clipboard operation
automerge-classic copied to clipboard

Add a commonjs build

Open salzhrani opened this issue 6 years ago • 1 comments

Currently the umd build includes all the dependencies, which is very useful. In the case of using a bundler like webpack, it usually handles the dependencies. Currently, to use the library with a bundler one needs to reference thesrc directory which includes non-traspiled code which is not recommended. Adding the build solves this but might change the main in package.json to point to the commonjs build and browser to point to the umd build. Not sure if this change breaks anything for current users.

salzhrani avatar Jun 22 '18 19:06 salzhrani

Hi @salzhrani, I'm not up-to-date on current best practices for JS bundling/packaging, so I'm happy to take your advice. How would we make this change? Do we require an update to the webpack configuration?

ept avatar Jun 25 '18 13:06 ept