Skip to content

Commit f5a3481

Browse files
authoredSep 23, 2022
fix(esbuild): transpile with esnext in dev (#10207)
1 parent 5d3a849 commit f5a3481

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
 

‎packages/plugin-vue/src/main.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,11 @@ export async function transformMain(
221221
const { code, map } = await transformWithEsbuild(
222222
resolvedCode,
223223
filename,
224-
{ loader: 'ts', sourcemap: options.sourceMap },
224+
{
225+
loader: 'ts',
226+
target: 'esnext',
227+
sourcemap: options.sourceMap
228+
},
225229
resolvedMap
226230
)
227231
resolvedCode = code

‎playground/vue/tsconfig.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"compilerOptions": {
3+
// esbuild transpile should ignore this
4+
"target": "ES5"
5+
},
6+
"include": ["src"]
7+
}

0 commit comments

Comments
 (0)
Please sign in to comment.