摘要: // 安装依赖包 npm i vite-plugin-webpackchunkname -D npm i @rollup/pluginutils -D 在路由文件中引入页面的时候添加 /* webpackChunkName: "xxxx" */ 不添加会按默认方式打包 import(/* webpa 阅读全文
posted @ 2022-03-24 15:31 Peter_Yang0942 阅读(1908) 评论(0) 推荐(0) 编辑
摘要: 安卓注册config正常 则ios注册config 签名错误问题 原因是ios 无论路由跳转多少次,复制出来的链接都是首次进入的页面的链接,vue单页应用会出现个这种问题 let url = location.href.split('#')[0] let isIOS = function () { 阅读全文
posted @ 2022-03-24 15:09 Peter_Yang0942 阅读(232) 评论(0) 推荐(0) 编辑
摘要: vue3+vite更新版本后报错:Cannot read property 'modules' of undefined 安装新依赖之后重新运行项目,发现页面打不开,控制台报错如上,首先看到Error出现在App.vue中,但是没装依赖之前项目是正常运行的,通过卸载依赖、重装依赖、页面清空等操作发现 阅读全文
posted @ 2022-03-24 14:57 Peter_Yang0942 阅读(1462) 评论(0) 推荐(0) 编辑
摘要: vite.config.js中增加配置: { build: { rollupOptions: { output: { // 最小化拆分包 manualChunks: (id) => { if (id.includes('node_modules')) { return id.toString().s 阅读全文
posted @ 2022-03-24 14:35 Peter_Yang0942 阅读(5312) 评论(1) 推荐(0) 编辑