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

Categories

为什么我npm run build 出来的js文件名称都是数字?
截屏2020-05-27上午9.52.08.png


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

1 Answer

没有设置 webpackChunkName 不知道你用的哪个版本的 webpack 或者 脚手架,不同版本写法稍有差异。
如果是这样引文件的:

const Login = () => import('./../page/Login.vue')

可以改成这样:

const Login = () => import('./../page/Login.vue' /* webpackChunkName: "Login" */ )

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...