Skip to content

Commit c84358a

Browse files
committed
Updated webpack.config.js
1 parent 54c5d07 commit c84358a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

webpack.config.js

+28
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,34 @@ module.exports = {
1515
exclude: /(node_modules)/,
1616
use: 'babel-loader',
1717
},
18+
{
19+
test: /\.css$/,
20+
use: [
21+
'style-loader',
22+
'css-loader'
23+
]
24+
}
1825
],
1926
},
27+
resolve: {
28+
alias: {
29+
'react': path.resolve(__dirname, './node_modules/react'),
30+
'react-dom': path.resolve(__dirname, './node_modules/react-dom'),
31+
}
32+
},
33+
externals: {
34+
// Don't bundle react or react-dom
35+
react: {
36+
commonjs: "react",
37+
commonjs2: "react",
38+
amd: "React",
39+
root: "React"
40+
},
41+
"react-dom": {
42+
commonjs: "react-dom",
43+
commonjs2: "react-dom",
44+
amd: "ReactDOM",
45+
root: "ReactDOM"
46+
}
47+
}
2048
};

0 commit comments

Comments
 (0)