Skip to content

Commit

Permalink
Update to svelte2tsx 0.6.15 and vite-plugin-svelte 2.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wackbyte authored and natemoo-re committed Jun 6, 2023
1 parent 8b5c311 commit 0f80550
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-turtles-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/svelte': patch
---

Update to svelte2tsx 0.6.15 and vite-plugin-svelte 2.4.1
8 changes: 4 additions & 4 deletions packages/integrations/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@
"dev": "astro-scripts dev \"src/**/*.ts\""
},
"dependencies": {
"@sveltejs/vite-plugin-svelte": "^2.1.1",
"svelte2tsx": "^0.5.11"
"@sveltejs/vite-plugin-svelte": "^2.4.1",
"svelte2tsx": "^0.6.15"
},
"devDependencies": {
"astro": "workspace:*",
"astro-scripts": "workspace:*",
"svelte": "^3.54.0",
"svelte": "^3.55.0",
"vite": "^4.3.1"
},
"peerDependencies": {
"astro": "workspace:^2.6.0",
"svelte": "^3.54.0"
"svelte": "^3.55.0"
},
"engines": {
"node": ">=16.12.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/svelte/src/editor.cts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function toTSX(code: string, className: string): string {
let tsx = svelte2tsx(code, { mode: 'ts' }).code;
tsx = '/// <reference types="svelte2tsx/svelte-shims" />\n' + tsx;
result = tsx.replace(
'export default class extends __sveltets_1_createSvelte2TsxComponent(',
'export default class extends __sveltets_2_createSvelte2TsxComponent(',
`export default function ${className}__AstroComponent_(_props: typeof Component.props): any {}\nlet Component = `
);
} catch (e: any) {
Expand Down

0 comments on commit 0f80550

Please sign in to comment.