A
A
andrewayder2021-11-21 19:54:29
webpack
andrewayder, 2021-11-21 19:54:29

How to use hash instead of filename?

Hello there is a function in vue.config.js

module.exports = defineConfig({
  filenameHashing: true
}),

It generates filenames like dist\css\app.b1d1061b.css instead of dist\css\app.css - but how do I change the pattern to generate filenames, for example I only want the hash in the filename - dist\сb1d1061b.css

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2021-11-21
@andrewayder

In theory, if vue-cli doesn't lock this particular webpack setting: configureWebpack / chainWebpack and output.filename / output.assetModuleFilename .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question