Skip to content
Snippets Groups Projects
Commit ce00aa19 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

Replace version from webpack config and use appropriate chunkhash instead

parent 0214dea9
No related branches found
No related tags found
No related merge requests found
...@@ -5,13 +5,6 @@ const VueLoaderPlugin = require('vue-loader/lib/plugin'); ...@@ -5,13 +5,6 @@ const VueLoaderPlugin = require('vue-loader/lib/plugin');
const assetsPath = path.resolve(__dirname, "resources/assets/javascripts"); 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 = { module.exports = {
entry: { entry: {
"studip-base": assetsPath + "/entry-base.js", "studip-base": assetsPath + "/entry-base.js",
...@@ -24,7 +17,7 @@ module.exports = { ...@@ -24,7 +17,7 @@ module.exports = {
}, },
output: { output: {
path: path.resolve(__dirname, "public/assets"), path: path.resolve(__dirname, "public/assets"),
chunkFilename: `javascripts/[id].chunk.js`, chunkFilename: "javascripts/[id].chunk.js?h=[chunkhash]",
filename: "javascripts/[name].js" filename: "javascripts/[name].js"
}, },
module: { module: {
...@@ -111,7 +104,7 @@ module.exports = { ...@@ -111,7 +104,7 @@ module.exports = {
new VueLoaderPlugin(), new VueLoaderPlugin(),
new MiniCssExtractPlugin({ new MiniCssExtractPlugin({
filename: "stylesheets/[name].css", filename: "stylesheets/[name].css",
chunkFilename: `stylesheets/[name]-${version.replace(/\W/g, '-')}.css` chunkFilename: "stylesheets/[name].css?h=[chunkhash]"
}), }),
], ],
resolve: { resolve: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment