Skip to content

Commit e31b9bf

Browse files
authored
fix: use esnext for useVitePreprocess (#452)
1 parent 28f2986 commit e31b9bf

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/cuddly-tools-fold.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/vite-plugin-svelte': patch
3+
---
4+
5+
Use esnext for useVitePreprocess

packages/vite-plugin-svelte/src/utils/preprocess.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function createViteScriptPreprocessor(): Preprocessor {
2323
if (!supportedScriptLangs.includes(lang)) return;
2424
const transformResult = await transformWithEsbuild(content, filename, {
2525
loader: lang as ESBuildOptions['loader'],
26+
target: 'esnext',
2627
tsconfigRaw: {
2728
compilerOptions: {
2829
// svelte typescript needs this flag to work with type imports

0 commit comments

Comments
 (0)