8000 fix: allow overwrite esbuild config · unplugin/unplugin-vue@f9c4ff9 · GitHub
[go: up one dir, main page]

Skip to content

Commit f9c4ff9

Browse files
committed
fix: allow overwrite esbuild config
ref: vitejs/vite-plugin-vue@1344294
1 parent 64f2256 commit f9c4ff9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,11 @@ export async function transformMain(
251251
resolvedCode,
252252
filename,
253253
{
254-
loader: 'ts',
255254
target: pluginContext.framework === 'vite' ? 'esnext' : undefined,
255+
// #430 support decorators in .vue file
256+
// target can be overridden by esbuild config target
257+
...options.devServer?.config.esbuild,
258+
loader: 'ts',
256259
sourcemap: options.sourceMap,
257260
},
258261
resolvedMap,

0 commit comments

Comments
 (0)
0