diff --git a/packages/plugin-vue/src/main.ts b/packages/plugin-vue/src/main.ts index bdb846ab..5d76256f 100644 --- a/packages/plugin-vue/src/main.ts +++ b/packages/plugin-vue/src/main.ts @@ -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 diff --git a/playground/vue/tsconfig.json b/playground/vue/tsconfig.json new file mode 100644 index 00000000..5f90cb16 --- /dev/null +++ b/playground/vue/tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + // esbuild transpile should ignore this + "target": "ES5" + }, + "include": ["src"] +}