随笔分类 -  Vue

pinia: Cannot read properties of undefined (reading '_s')
摘要:使用 Vue3 + Pinia + PNPM + Vite 开发一个前端项目时,运行preview,报错: pinia Cannot read properties of undefined (reading '_s') 报错的代码是压缩后的: function we(e, t, n) { let 阅读全文
posted @ 2023-10-24 21:40 死宅程序员 阅读(1467) 评论(1) 推荐(0)
Application entry file "electron\background.js" does not exist
摘要:背景 用 Vue3 + Electron 开发了个 PDF 自由合并客户端。 客户端侧代码慢慢膨胀,于是想将默认的路径src/background.js调整到 electron/background.js。 于是修改了: vue.config.js pluginOptions: { electron 阅读全文
posted @ 2022-12-07 00:11 死宅程序员 阅读(1134) 评论(0) 推荐(0)
Module not found: Error: Can't resolve element-plus/es/components/button/style/css
摘要:在开发一个 Chrome 扩展时,依赖了element-plus。 想体验按需加载的福利,于是借助了这个 package:unplugin-element-plus/webpack,引入方式如下 const ElementPlus = require('unplugin-element-plus/w 阅读全文
posted @ 2021-12-28 12:16 死宅程序员 阅读(7295) 评论(0) 推荐(0)
Vue3: does not provide an export named 'createRouter'
摘要:背景 在 vite 工程下,使用 Vue 3.x、Vue-router 时报错: does not provide an export named 'createRouter' 回顾 使用 vite 创建工程后, 通过 npm i --save vue-router 命令安装依赖,当前默认安装的是 阅读全文
posted @ 2021-03-09 10:34 死宅程序员 阅读(11584) 评论(0) 推荐(1)
Vue: Uncaught TypeError: Cannot set property 'errorHandler' of undefined
摘要:前端报错 Uncaught TypeError: Cannot set property 'errorHandler' of undefined 环境 Vue 3.x 分析 errorHandler为 Vue.config 上的接口。三方插件复写此接口时读取。 样例: export default 阅读全文
posted @ 2020-10-27 02:40 死宅程序员 阅读(704) 评论(0) 推荐(0)