Skip to content

Instantly share code, notes, and snippets.

@benjohnson
Last active August 29, 2015 14:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save benjohnson/f7f8f3ea30142024dae6 to your computer and use it in GitHub Desktop.
Save benjohnson/f7f8f3ea30142024dae6 to your computer and use it in GitHub Desktop.
React Nested Router (UMD)
# React Nested Router is only distributed with CommonJS.
# To get an UMD version run the command below.
$ npm install webpack
$ npm install react-nested-router
# Make a file: webpack.config.js containing:
module.exports = { output: { libraryTarget: "umd" }, externals: { "react": "react" } }
$ /node_modules/.bin/webpack node_modules/react-nested-router/modules/main.js output.js
@ryanflorence
Copy link

cool, thanks, I might maintain a "components" repo with this, since, like others, we have existing apps with AMD/globals that are bringing in React and can't make the switch to cjs (without months of work and bugs).

@dispalt
Copy link

dispalt commented Jul 15, 2014

+1 on that.

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