Skip to content

add a jsnext:main so we can distribute ES6 modules #2523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## [HEAD]

### Distribute ES6/ES2015 modules for Rollup optimization

See the [Rollup repo](https://github.com/rollup/rollup#a-next-generation-es6-module-bundler) for more details

## [v1.1.0]

### Router `onUpdate` prop
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Using [npm](https://www.npmjs.com/):

Note that you need to also install the [history](https://www.npmjs.com/package/history) package since it is a peer dependency of React Router and won't automatically be installed for you in npm 3+.

Then with a module bundler like [webpack](https://webpack.github.io/), use as you would anything else:
Then with a module bundler like [webpack](https://webpack.github.io/) or [rollup](https://github.com/rollup/rollup), use as you would anything else:

```js
// using an ES6 transpiler, like babel
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
"*.md",
"docs",
"lib",
"modules",
"npm-scripts",
"umd"
],
"main": "lib/index",
"jsnext:main": "modules/index",
"repository": {
"type": "git",
"url": "https://github.com/rackt/react-router.git"
Expand Down