Skip to content

Commit

Permalink
Adding array, simplifying the alias
Browse files Browse the repository at this point in the history
  • Loading branch information
Eimi Okuno committed Apr 8, 2020
1 parent 800f008 commit 659bed4
Showing 1 changed file with 11 additions and 29 deletions.
40 changes: 11 additions & 29 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,14 @@ module.exports = {
include: path.resolve(__dirname, 'src'),
// TODO: because it uses entry point to determine graph of dependencies, might not be needed to exclude test ans sample files?
exclude: /(node_modules|bower_components|build|dist|demo|.storybook|storybook-static)/,
use: {
loader: 'babel-loader',
options: {
presets: [ '@babel/preset-env', '@babel/preset-react' ]
use: [
{
loader: 'babel-loader',
options: {
presets: [ '@babel/preset-env', '@babel/preset-react' ]
}
}
}
]
}
]
},
Expand All @@ -86,29 +88,9 @@ module.exports = {
},
externals: {
// Don't bundle react or react-dom or react-router
react: {
commonjs: 'react',
commonjs2: 'react',
amd: 'React',
root: 'React'
},
'react-dom': {
commonjs: 'react-dom',
commonjs2: 'react-dom',
amd: 'ReactDOM',
root: 'ReactDOM'
},
'react-router': {
commonjs: 'react-router',
commonjs2: 'react-router',
amd: 'ReactRouter',
root: 'ReactRouter'
},
'react-router-dom': {
commonjs: 'react-router-dom',
commonjs2: 'react-router-dom',
amd: 'ReactRouterDOM',
root: 'ReactRouterDOM'
}
react: 'react',
'react-dom': 'react-dom',
'react-router': 'react-router',
'react-router-dom': 'react-router-dom'
}
};

0 comments on commit 659bed4

Please sign in to comment.