修复一个fs引入错误

This commit is contained in:
chenqiang 2025-08-12 18:20:28 +08:00
parent 6a81060e77
commit 31ebc97568
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,7 @@
// 确保所有导入都使用 ES 模块语法 // 确保所有导入都使用 ES 模块语法
import { app, BrowserWindow, ipcMain, dialog } from "electron"; import { app, BrowserWindow, ipcMain, dialog } from "electron";
import { fs } from "fs"; // 修改fs模块的导入方式 - 从命名导入改为默认导入
import fs from "fs";
import path from "path"; import path from "path";
import { fileURLToPath } from "url"; import { fileURLToPath } from "url";
import { migrateDatabases } from './db/migration.js'; import { migrateDatabases } from './db/migration.js';

View File

@ -5,7 +5,6 @@ import electron from 'vite-plugin-electron'
import { fileURLToPath } from 'url'; import { fileURLToPath } from 'url';
export default defineConfig({ export default defineConfig({
// 添加base配置确保静态资源使用相对路径
base: './', base: './',
plugins: [ plugins: [
vue(), vue(),