1.用webpack-simple模板生成的vue项目
项目结构参见https://github.com/vuejs-temp...
请求不带hash,js会有缓存的问题。
webpack配置中这样改就能生成带hash的文件名
output: {
path: path.resolve(__dirname, './dist'),
publicPath: '/dist/',
filename: '[hash].build.js'
}
查了下html-webpack-plugin插件可以在dist目录下生成一个html来加上hash
有没有什么简洁优雅的办法在不更改index.html路径的情况下去修改index.html中script标签引用的js文件名呢?或者在文件名后加上?[hash]