Z
Z
Zhainar2020-07-14 10:44:53
Vue.js
Zhainar, 2020-07-14 10:44:53

Vue how to add hash to final js?

How to make the hash of the file added to the final js file in the template when building vue? Because it turns out there are changes in the file, but the user does not see them.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael, 2020-07-14
@zhainar

output: {
    filename: 'file-[contenthash].js',
    chunkFilename: 'chunk-[contenthash].js',
  }

filename would also have a hash, but then you need to be able to insert it into html if it's not done by webpack
https://webpack.js.org/configuration/output/#templ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question