Skip to content

Commit ce44f91

Browse files
authored
Merge pull request #42 from ReactMaker/feature/chunk
add split chunks
2 parents 815cbc1 + 8ba973a commit ce44f91

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/containers/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import NotFound from './NotFound';
99
const LoadComponent = loader => Loadable({
1010
loader,
1111
loading: Loading,
12-
})
12+
});
1313

1414
const Home = LoadComponent(() => import('./Home'));
1515

webpack.config.base.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,15 @@ module.exports = {
4747
path.resolve(__dirname, 'node_modules/'),
4848
]
4949
},
50+
optimization: {
51+
splitChunks: {
52+
chunks: 'all'
53+
}
54+
},
5055
plugins: [
5156
new HtmlWebPackPlugin({
5257
template: path.resolve(__dirname, 'src/index.html'),
5358
filename: "./index.html"
5459
})
5560
]
56-
};
61+
};

0 commit comments

Comments
 (0)