Skip to content

Conversation

@realityking
Copy link
Contributor

@realityking realityking commented Aug 27, 2018

Note that this PR contains 3 parts:

  • Update jest to 23.5. This is necessary for my changes to babel to work. (Update jest to 23.5 #143)
  • The actual change to the build process
  • Adding match and pick to the public API as they otherwise become inaccessible

The primary benefit is that the ESM and CommonJS will be a little smaller because Babel helpers get deduplicated and, when bundling the CommonJS version with webpack, less functions will be created. It also gives Uglify a few more options as less functions are exposed (e.g. startsWith)

It also cleans the project itself a bit up, .babelrc is now a simple JSON file and everything interesting can be found in rollup.config.js.

Downside: The public API is more rigid as only exports from index.js can be consumed

Caution This change is semver major

@realityking realityking changed the title Bundle route into a single file Bundle router into a single file Aug 27, 2018
@ryanflorence
Copy link
Member

I appreciate this work, and sorry it took so long to see this, going to close though since we're going to button up the API here soon and messing with the build artifacts is always risky.

For more context: https://reacttraining.com/blog/reach-react-router-future/

Maybe we'll come back to this though, thank you again for your time on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants