Skip to content

Commit d10e467

Browse files
committed
feat: esbuild windows support
1 parent b6a7b7c commit d10e467

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import { join } from 'path';
2+
import { fileURLToPath } from 'url';
23

34
const projectRoot = process.cwd();
4-
const outputPath = join(projectRoot, '.edge');
5+
const isWindows = process.platform === 'win32';
6+
const outputPath = isWindows
7+
? fileURLToPath(new URL(`file:///${join(projectRoot, '.edge')}`))
8+
: join(projectRoot, '.edge');
59

610
export default {
711
bundle: true,
812
minify: true,
913
target: 'es2022',
10-
platform: 'neutral',
14+
platform: 'browser',
1115
outfile: join(outputPath, 'worker.js'),
1216
};

0 commit comments

Comments
 (0)