Skip to content

Commit

Permalink
fix(webpack): add externals and react-based bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
elboman committed Oct 31, 2017
1 parent b21ada9 commit 11d7cf0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ var webpack = require("webpack");
var config = {
entry: {
"uirouter-redux": ["./core/index.ts"],
"uirouter-redux.min": ["./core/index.ts"]
"uirouter-redux.min": ["./core/index.ts"],
"uirouter-redux-react": ["./react/index.ts"],
"uirouter-redux-react.min": ["./react/index.ts"],
},
output: {
path: path.resolve(__dirname, "_bundles"),
Expand All @@ -31,6 +33,12 @@ var config = {
exclude: /(node_modules|__tests__)/
}
]
},
externals: {
"react": { root: 'React', amd: 'react', commonjs2: 'react', commonjs: 'react' },
"prop-types": { root: 'PropTypes', amd: 'prop-types', commonjs2: 'prop-types', commonjs: 'prop-types' },
"@uirouter/core": { root: 'UIRouter', amd: '@uirouter/core', commonjs2: '@uirouter/core', commonjs: '@uirouter/core' },
"@uirouter/react": { root: 'UIRouterReact', amd: '@uirouter/react', commonjs2: '@uirouter/react', commonjs: '@uirouter/react' }
}
};

Expand Down

0 comments on commit 11d7cf0

Please sign in to comment.