Skip to content

Commit

Permalink
fix: add external to dev build
Browse files Browse the repository at this point in the history
  • Loading branch information
Vandish Gandhi committed Jun 14, 2019
1 parent 9f75794 commit de5b2bf
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion config/webpack.config.dev.build.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,52 @@ module.exports = webpackMerge(commonConfig, {
mode: 'development',
// You may want 'eval' instead if you prefer to see the compiled output in DevTools.
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.
devtool: 'source-map',
devtool: 'cheap-eval-source-map',
entry: paths.appSrc,
output: {
path: paths.appBuild,
filename: 'adslot-ui.js',
libraryTarget: 'umd',
library: 'AdslotUI',
},
externals: {
lodash: {
root: '_',
commonjs2: 'lodash',
commonjs: 'lodash',
amd: 'lodash',
},
react: {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react',
},
'react-dom': {
root: 'ReactDOM',
commonjs2: 'react-dom',
commonjs: 'react-dom',
amd: 'react-dom',
},
'react-redux': {
root: 'reactRedux',
commonjs2: 'react-redux',
commonjs: 'react-redux',
amd: 'react-redux',
},
redux: {
root: 'Redux',
commonjs2: 'redux',
commonjs: 'redux',
amd: 'redux',
},
moment: {
root: 'moment',
commonjs2: 'moment',
commonjs: 'moment',
amd: 'moment',
},
},
module: {
strictExportPresence: true,
rules: [
Expand Down

0 comments on commit de5b2bf

Please sign in to comment.