Skip to content

Commit

Permalink
Exclude <Route>, <Switch>, etc. from UMD build
Browse files Browse the repository at this point in the history
There has to be a better way...
  • Loading branch information
mjackson committed Sep 30, 2018
1 parent 0d9e0ce commit 5fb11b3
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions packages/react-router-config/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,21 @@ const config = {
name: "ReactRouterConfig",
globals: {
react: "React",
"react-router": "ReactRouter"
"react-router": "ReactRouter",
"react-router/es/Route": "ReactRouter.Route",
"react-router/es/Router": "ReactRouter.Router",
"react-router/es/Switch": "ReactRouter.Switch",
"react-router/es/matchPath": "ReactRouter.matchPath"
}
},
external: ["react", "react-router"],
external: [
"react",
"react-router",
"react-router/es/Route",
"react-router/es/Router",
"react-router/es/Switch",
"react-router/es/matchPath"
],
plugins: [
babel({
exclude: "node_modules/**",
Expand Down

0 comments on commit 5fb11b3

Please sign in to comment.