From 74864af35971416704368bb1638fe5f2da306a91 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Wed, 23 May 2018 11:54:25 +0300 Subject: [PATCH] Prefer more descriptive esm word instead of es es has different meanings. Some call it es5+ syntax or just es6. There is a precedent of using `es` for untranspiled code in [materia-ui](https://unpkg.com/@material-ui/core@1.0.0/es/). In this diff I propose to rename `es` to `esm` as a shorthand for ES Modules. `jsnext:main` is deprecated in rollup community (it came from rollup and dead in it) and shouldn't be used anymore. `module` is enabled by default like in webpack. --- package.json | 3 +-- rollup.config.js | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bbe6170dcb..01725f86a6 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,7 @@ "version": "2.0.0-beta.6", "description": "A Select control built with and for ReactJS", "main": "lib/index.js", - "jsnext:main": "dist/react-select.es.js", - "module": "dist/react-select.es.js", + "module": "dist/react-select.esm.js", "author": "Jed Watson", "license": "MIT", "repository": { diff --git a/rollup.config.js b/rollup.config.js index 0b0df31b5f..b340ac6baf 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -43,6 +43,7 @@ export default [ external: [...external, 'raf'], plugins: [babel(babelOptions())], }, + { input: 'src/index.umd.js', output: { @@ -54,6 +55,7 @@ export default [ external, plugins: [babel(babelOptions()), resolve(), commonjs()], }, + { input: 'src/index.umd.js', output: {