diff --git a/emain/platform.ts b/emain/platform.ts index b939ba9c..f40f3163 100644 --- a/emain/platform.ts +++ b/emain/platform.ts @@ -41,7 +41,7 @@ function getWaveHomeDir() { } function getElectronAppBasePath(): string { - return path.dirname(__dirname); + return path.dirname(import.meta.dirname); } function getGoAppBasePath(): string { diff --git a/tsconfig.json b/tsconfig.json index c2d92249..d782c63c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "include": ["frontend/**/*", "emain/**/*"], "compilerOptions": { "target": "es6", - "module": "commonjs", + "module": "es2020", "jsx": "preserve", "esModuleInterop": true, "skipLibCheck": true,