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
Loading
......@@ -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: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment