mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-08-26 23:11:18 +08:00
fix: ensure process.cwd() correct.
This commit is contained in:
4
src/common/patch.ts
Normal file
4
src/common/patch.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* !!! ensure process.cwd() correct
|
||||
*/
|
||||
process.chdir(__dirname.slice(0, __dirname.lastIndexOf('dist')))
|
@@ -1,6 +1,7 @@
|
||||
/**
|
||||
* electron 主文件
|
||||
*/
|
||||
import '@src/common/patch'
|
||||
import { join } from 'path'
|
||||
import { app, BrowserWindow } from 'electron'
|
||||
import dotenv from 'dotenv'
|
||||
|
@@ -1,8 +1,4 @@
|
||||
/**
|
||||
* !!! ensure cwd crrect
|
||||
*/
|
||||
process.chdir(__dirname)
|
||||
|
||||
import '@src/common/patch'
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import fs = require('fs')
|
||||
|
Reference in New Issue
Block a user