electron에서 vue-router 를 사용할때 동작을 하지 않는 경우가 있다. router 를 생성할때 history 모드가 아닌 hash 모드를 사용하면 잘 동작 한다. ※ 아래의 코드는 vue 3.x 와 vue-router 4.x의 예제 코드 이다. // router.ts import { createRouter, createWebHashHistory } from 'vue-router' const routes = [ { path: '/page1', component: () => import('./Page1.vue') }, { path: '/page2', component: () => import('./Page2.vue') } ] export default createRouter({ history:..
electron에서 better-sqlite3 모듈을 사용할 경우 아래와 같은 문제가 발생하는 경우가 있다. node_modules\sqlite3\lib\binding\electron-v4.0-win32-x64\node_sqlite3.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 64. This version of Node.js requires NODE_MODULE_VERSION 69. Please try re-compiling or re-installing the module (for instance, using npm rebuildornpm install). 위와 같은 문제가 발생했다면 아래와 같이 시도..
Electron + Vite + Vue3 + Typescript를 이용하여 데스크탑 앱 개발 환경을 설정해보자. 1. Vite 프로젝트 생성 $ yarn create vite yarn create v1.22.15 [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... success Installed "create-vite@2.7.2" with binaries: - create-vite - cva √ Project name: ... sample-project √ Select a framework: » vue √ Select a variant: » vue..
- Total
- Today
- Yesterday