Skip to content

Commit

Permalink
fix: use esnext for useVitePreprocess (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Sep 23, 2022
1 parent 28f2986 commit e31b9bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/cuddly-tools-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/vite-plugin-svelte': patch
---

Use esnext for useVitePreprocess
1 change: 1 addition & 0 deletions packages/vite-plugin-svelte/src/utils/preprocess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function createViteScriptPreprocessor(): Preprocessor {
if (!supportedScriptLangs.includes(lang)) return;
const transformResult = await transformWithEsbuild(content, filename, {
loader: lang as ESBuildOptions['loader'],
target: 'esnext',
tsconfigRaw: {
compilerOptions: {
// svelte typescript needs this flag to work with type imports
Expand Down

0 comments on commit e31b9bf

Please sign in to comment.