mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 01:12:19 +08:00
fix: Move chunk splitting from prod to common so we get the same files in dev as prod
This commit is contained in:
@ -10,7 +10,7 @@ module.exports = {
|
||||
path: path.resolve(__dirname, '../../public/build'),
|
||||
filename: '[name].[hash].js',
|
||||
// Keep publicPath relative for host.com/grafana/ deployments
|
||||
publicPath: "public/build/",
|
||||
publicPath: 'public/build/',
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.ts', '.tsx', '.es6', '.js', '.json', '.svg'],
|
||||
@ -61,6 +61,18 @@ module.exports = {
|
||||
}
|
||||
]
|
||||
},
|
||||
// https://webpack.js.org/plugins/split-chunks-plugin/#split-chunks-example-3
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
commons: {
|
||||
test: /[\\/]node_modules[\\/].*[jt]sx?$/,
|
||||
name: 'vendor',
|
||||
chunks: 'all'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new ForkTsCheckerWebpackPlugin({
|
||||
checkSyntacticErrors: true,
|
||||
|
Reference in New Issue
Block a user