Navigation Menu

Skip to content

Commit

Permalink
fix: only use esm shim for node platform (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhmushan committed Nov 30, 2021
1 parent d0870dd commit 29dcb8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/esbuild/index.ts
Expand Up @@ -172,7 +172,7 @@ export async function runEsbuild(
},
inject: [
format === 'cjs' ? path.join(__dirname, '../assets/cjs_shims.js') : '',
format === 'esm' ? path.join(__dirname, '../assets/esm_shims.js') : '',
format === 'esm' && platform === 'node' ? path.join(__dirname, '../assets/esm_shims.js') : '',
...(options.inject || []),
].filter(Boolean),
outdir:
Expand Down

0 comments on commit 29dcb8e

Please sign in to comment.