0.1.7 • Published 4 years ago

test-es6-module-with-commonjs v0.1.7

Weekly downloads
32
License
-
Repository
-
Last release
4 years ago

ESM Package (with Hybrid CommonJS support)

Concept for publishing an NPM ESM package (with CommonJS backward):

  • Create an ESModule package (in ./src) {type:"module"}
  • On publish use Babel to transpile (in ./lib) -> Also add {"type":"commonjs"} on ./lib/package.json file.
  • use ./node_modules/.bin on script to avoid using global on another environment.
  • Store only ./src on dit (./lib and ./node_modules are useless)
  • Before Publishing, transpile the package (Root-Project's Babel who'll use commonjs version of this package will not bundle dependencies)

Links

Note

  • script transpile:js is probably useless (but in case we need to provide a minimify version ?)
0.1.7

4 years ago

0.1.6

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.5

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago