3.0.0-rc.3
Have tried below two options as suggested in docs... but doesn't seem to work
//vue.config.js
module.exports = {
chainWebpack: config => {
config
.plugin('html')
.tap(args => {
args[0].hash = false;
return args
})
}
}
module.exports = {
chainWebpack: config => {
config
.plugin('html')
.tap(args => [{
hash: false
}])
}
}
Was expecting output file name to be just app.css instead of app.########.css
I am getting app.########.css
Use
'[name].js'
for output.filename
and output.chunkFilename
in chainWebpack
{ filename: '[name].css' }
for css.extract
option in vue.config.js
.Try:
// vue.config.js
module.exports = {
chainWebpack: config => {
if(config.plugins.has('extract-css')) {
const extractCSSPlugin = config.plugin('extract-css')
extractCSSPlugin && extractCSSPlugin.tap(() => [{
filename: '[name].css',
chunkFilename: '[name].css'
}])
}
},
configureWebpack: {
output: {
filename: '[name].js',
chunkFilename: '[name].js'
}
}
}
@yyx990803 @Akryum That worked... Thank you.
@Akryum This should really go into documentation, it would help a lot of people.
@yyx990803 Maybe we can add a "Common recipes" page in the docs?
How to disable filenameHashing
on a specific file/chunk?
I have a case to disable the hashing for only each of theme.scss
Evan's solution looks like this in vue.config.js
:
module.exports = {
configureWebpack: config => {
config.output.filename = '[name].js'
config.output.chunkFilename = '[name].js'
},
css: {
extract: {
filename: '[name].css',
},
},
}
Just adding this here, to keep people up to date. This is now an option in vue.config.js
:
Most helpful comment
Try: