From 616e770a48833c74db5680bbf6fe23cb5e462b42 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Wed, 1 Feb 2017 12:43:23 +0700 Subject: [PATCH] Recommend 'module' field over 'jsnext:main' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 25d1958..58b4023 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ Unfortunately, **traditional modules – CommonJS and AMD – result in code mo ## Can I distribute my package as an ES6 module? -If your `package.json` has a `jsnext:main` field, ES6-aware tools like Rollup can import the ES6 version of the package instead of the legacy CommonJS or UMD version. You'll be writing your code in a more future-proof way, and helping to bring an end to the [dark days of JavaScript package management](https://medium.com/@trek/last-week-i-had-a-small-meltdown-on-twitter-about-npms-future-plans-around-front-end-packaging-b424dd8d367a). [Learn more here.](https://github.com/rollup/rollup/wiki/jsnext:main) +If your `package.json` has a `module` field, ES6-aware tools like Rollup can import the ES6 version of the package instead of the legacy CommonJS or UMD version. You'll be writing your code in a more future-proof way, and helping to bring an end to the [dark days of JavaScript package management](https://medium.com/@trek/last-week-i-had-a-small-meltdown-on-twitter-about-npms-future-plans-around-front-end-packaging-b424dd8d367a). [Learn more here.](https://github.com/rollup/rollup/wiki/pkg.module) See [rollup-starter-project](https://github.com/rollup/rollup-starter-project) for inspiration on how to get started.