diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2021-10-14 12:23:47 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2021-10-14 12:23:47 +0000 |
| commit | ce00aa19ae543acf6955009fc7f4fe9c4b1539d1 (patch) | |
| tree | 0cba687c92d8e88fa91dc26c30afa3d85c73df96 | |
| parent | 0214dea9bd6c2e41e7a95a473a804bc8165d7438 (diff) | |
Replace version from webpack config and use appropriate chunkhash instead
| -rw-r--r-- | webpack.common.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/webpack.common.js b/webpack.common.js index 9be879f..22469db 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -5,13 +5,6 @@ const VueLoaderPlugin = require('vue-loader/lib/plugin'); const assetsPath = path.resolve(__dirname, "resources/assets/javascripts"); -const fs = require('fs'); -const version = fs.readFileSync(path.resolve(__dirname, 'VERSION'), 'utf-8') - .trim() - .split(' ') - .slice(1) - .join(' '); - module.exports = { entry: { "studip-base": assetsPath + "/entry-base.js", @@ -24,7 +17,7 @@ module.exports = { }, output: { path: path.resolve(__dirname, "public/assets"), - chunkFilename: `javascripts/[id].chunk.js`, + chunkFilename: "javascripts/[id].chunk.js?h=[chunkhash]", filename: "javascripts/[name].js" }, module: { @@ -111,7 +104,7 @@ module.exports = { new VueLoaderPlugin(), new MiniCssExtractPlugin({ filename: "stylesheets/[name].css", - chunkFilename: `stylesheets/[name]-${version.replace(/\W/g, '-')}.css` + chunkFilename: "stylesheets/[name].css?h=[chunkhash]" }), ], resolve: { |
