Skip to content

Commit

Permalink
Update to svelte2tsx 0.6.15 and vite-plugin-svelte 2.4.1 (#7314)
Browse files Browse the repository at this point in the history
  • Loading branch information
wackbyte committed Jun 6, 2023
1 parent 8a029d9 commit e47e53d
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-turtles-tap.md
@@ -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
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.1",
"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
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
44 changes: 32 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e47e53d

Please sign in to comment.