Skip to content

Commit

Permalink
fix(esbuild): transpile with esnext in dev (#10207)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Sep 23, 2022
1 parent 5d3a849 commit f5a3481
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/plugin-vue/src/main.ts
Expand Up @@ -221,7 +221,11 @@ export async function transformMain(
const { code, map } = await transformWithEsbuild(
resolvedCode,
filename,
{ loader: 'ts', sourcemap: options.sourceMap },
{
loader: 'ts',
target: 'esnext',
sourcemap: options.sourceMap
},
resolvedMap
)
resolvedCode = code
Expand Down
7 changes: 7 additions & 0 deletions playground/vue/tsconfig.json
@@ -0,0 +1,7 @@
{
"compilerOptions": {
// esbuild transpile should ignore this
"target": "ES5"
},
"include": ["src"]
}

0 comments on commit f5a3481

Please sign in to comment.