Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.7k views
in Technique[技术] by (71.8m points)

vue打包之后的为什么js没有在一个文件夹

image
image
没有webpack配置文件,config.js下面有这几个配置
image


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

尝试一下配置:

module.exports = {
  chainWebpack: (config) => {
    config.output.filename("js/[name].[contenthash:8].js");
    config.output.chunkFilename("js/[name].[contenthash:8].js");
  },
};

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...