Created
June 1, 2018 11:16
-
-
Save rayfranco/9c05ed4392eb6accbec2e7bc941f9877 to your computer and use it in GitHub Desktop.
Remove hash from filenames in Nuxt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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