diff options
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/webpack.config.js b/webpack.config.js index 5109103f7f..9252a5a31f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -74,7 +74,7 @@ export default { }, chunkFilename: ({chunk}) => { const language = (/monaco.*languages?_.+?_(.+?)_/.exec(chunk.id) || [])[1]; - return language ? `js/monaco-language-${language.toLowerCase()}.js` : `js/[name].js`; + return `js/${language ? `monaco-language-${language.toLowerCase()}` : `[name]`}.[contenthash:8].js`; }, }, optimization: { @@ -173,14 +173,14 @@ export default { test: /\.(ttf|woff2?)$/, type: 'asset/resource', generator: { - filename: 'fonts/[name][ext]', + filename: 'fonts/[name].[contenthash:8][ext]', } }, { test: /\.png$/i, type: 'asset/resource', generator: { - filename: 'img/webpack/[name][ext]', + filename: 'img/webpack/[name].[contenthash:8][ext]', } }, ], @@ -189,17 +189,17 @@ export default { new VueLoaderPlugin(), new MiniCssExtractPlugin({ filename: 'css/[name].css', - chunkFilename: 'css/[name].css', + chunkFilename: 'css/[name].[contenthash:8].css', }), new SourceMapDevToolPlugin({ - filename: '[file].map', + filename: '[file].[contenthash:8].map', include: [ 'js/index.js', 'css/index.css', ], }), new MonacoWebpackPlugin({ - filename: 'js/monaco-[name].worker.js', + filename: 'js/monaco-[name].[contenthash:8].worker.js', }), isProduction ? new LicenseCheckerWebpackPlugin({ outputFilename: 'js/licenses.txt', |