Skip to content

Commit

Permalink
fix: transpile with esnext in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Oct 3, 2022
1 parent b360d92 commit 19cb135
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,11 @@ export async function transformMain(
const { code, map } = await transformWithEsbuild(
resolvedCode,
filename,
{ loader: 'ts', sourcemap: options.sourceMap },
{
loader: 'ts',
target: pluginContext.framework === 'vite' ? 'esnext' : undefined,
sourcemap: options.sourceMap,
},
resolvedMap
)
resolvedCode = code
Expand Down

0 comments on commit 19cb135

Please sign in to comment.