单页面时没问题,改为多页面后运行页面空白,控制台提示:
The resource http://localhost:6255/runtime~index.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as
value and it is preloaded intentionally.
我的vue.config.js文件入口配置
参考了一些网上的文章,发现有出现相同的情况。然后与其他文章对比发现图一框框中的文件名大多是不一样的,借鉴他们的修改方法,在chunks 里添加我控制台提示的文件
然后npm run dev重新运行,问题解决,后来发现vue.config.js文件里有这个配置,把他注释掉也可以解决问题
总结:各位如果遇到类似情况可以尝试在chunk:[]中添加控制台提示的那个文件,原理不太懂,如果有知道的大佬可以在评论区评论,谢谢
参考:(https://github.com/vuejs/vue-...,(https://segmentfault.com/q/10...
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。