Skip to content

Commit 268b2be

Browse files
committed
Fix webpack size
1 parent 44017f9 commit 268b2be

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

webpack.config.js

+6-8
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ const lessLoader = {
1717
module.exports = {
1818
mode: 'development',
1919
entry: {
20-
app: './src/App.tsx',
21-
vendor: [ 'react', 'react-dom' ]
20+
app: './src/App.tsx'
2221
},
23-
devtool: 'source-map',
2422
plugins: [
2523
new webpack.HotModuleReplacementPlugin(),
2624
new CleanWebpackPlugin(),
@@ -69,6 +67,11 @@ module.exports = {
6967
filename: '[name].bundle.js',
7068
path: path.resolve(__dirname, 'dist')
7169
},
70+
optimization: {
71+
splitChunks: {
72+
chunks: 'all'
73+
}
74+
},
7275
module: {
7376
rules: [
7477
{
@@ -81,11 +84,6 @@ module.exports = {
8184
loader: 'ts-loader',
8285
exclude: /node_modules/
8386
},
84-
/* {
85-
test: /\.css$/,
86-
include: path.resolve(__dirname, 'src'),
87-
use: [ 'style-loader', 'css-loader' ]
88-
}, */
8987
{
9088
test: /\.(png|svg|jpg|gif)$/,
9189
include: path.resolve(__dirname, 'src'),

0 commit comments

Comments
 (0)