Solve vuejS packaging caching problem
index.html
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">
Copy the code
vue.config.js
const Timestamp = new Date().getTime() const ExtractTextPlugin = require('extract-text-webpack-plugin') module.exports = { outputDir: 'dist', configureWebpack: config => { config.output.filename = `[name].${process.env.NODE_ENV}.${Timestamp}.js` config.output.chunkFilename = `[name].${process.env.NODE_ENV}.${Timestamp}.js` }, css: { extract: { filename: `css/[name].${process.env.NODE_ENV}.${Timestamp}.vw.css`, chunkFilename: `css/[name].${process.env.NODE_ENV}.${Timestamp}.vw.css` } } }Copy the code