Is there a way to disable the built-in hashing of filenames? I have a use-case that requires it. I've tried putting "options: { name: '[name].[ext]'}" in loader rules in my nwb.config.js but haven't found a config that works.
Thanks
This issue is a:
Is this just for static files which are being imported to be handled by Webpack?
This should configure all the default url-loaders appropriately (using the rule ids from here):
module.exports = {
webpack: {
rules: {
graphics: {name: '[name].[ext]'},
svg: {name: '[name].[ext]'},
jpeg: {name: '[name].[ext]'},
fonts: {name: '[name].[ext]'},
video: {name: '[name].[ext]'},
audio: {name: '[name].[ext]'}
}
}
}
I could also add additional config to allow you to configure the default url loader settings, which would take care of all of these in one go.
Thanks. This helps. Any way to do the same for js and css?
extractText and extra should get you the rest of the way.
module.exports = {
webpack: {
extractText: {
filename: '[name].css'
},
extra: {
output: {
filename: '[name].js',
chunkFilename: '[name].js'
}
}
}
}
Much appreciated!
What's the use-case for needing un-hashed filenames, if you can tell me?
This is potentially something which could be controlled by adding new higher-level convenience config if it would be generally useful, e.g.
module.exports = {
webpack: {
hashFilenames: false
}
}
My built assets are tracked in a separate cvs-like source control system and it would be painful to manage them with changing filenames. I suspect it's a fairly unique use-case.
Most helpful comment
My built assets are tracked in a separate cvs-like source control system and it would be painful to manage them with changing filenames. I suspect it's a fairly unique use-case.