由于chunk-vendors過大,于是想通過設置optimization.splitChunks拆分一下大的js文件,但是設置后導致頁面一片空白,配置如下:


控制臺警告:
The resource <URL> 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.
點開后有16個類似的警告
the resource http://localhost:8087/npm.vuex.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.
The resource http://localhost:8087/npm.vue.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.
后來看到了這個 http://www.itdecent.cn/p/78ca0d36b99d 受到啟發(fā),于是我到vue-cli 的文檔上找到了這個

將所有警報的chunks都添加上,配置如下

重啟!頁面正常顯示了?。?!