Skip to content

Instantly share code, notes, and snippets.

@rayfranco
Created June 1, 2018 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rayfranco/9c05ed4392eb6accbec2e7bc941f9877 to your computer and use it in GitHub Desktop.
Save rayfranco/9c05ed4392eb6accbec2e7bc941f9877 to your computer and use it in GitHub Desktop.
Remove hash from filenames in Nuxt
module.exports = {
build: {
// Remove hash from build files
filenames: {
css: 'common.css',
manifest: 'manifest.js',
vendor: 'common.js',
app: 'app.js',
chunk: '[name].js'
},
extend (config) {
// Remove hash from url-loader
config.module.rules.filter(function (module) {
return module.loader === 'url-loader'
}).forEach((module) => {
const { options } = module
options.name = options.name.replace('.[hash:7]', '')
})
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment