-
-
Notifications
You must be signed in to change notification settings - Fork 213
Open
Labels
feature requestNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Describe the bug
When using the extension to generate a new +error.svelte
file it gives this output:
<script lang="ts">
import { page } from '$app/stores';
</script>
<h1>{$page.status}: {$page.error?.message}</h1>
This uses the deprecated $app/stores
module
Reproduction
In VSCode open the file explorer, hover over any directory in src/routes
and right click, choose SvelteKit Files
> SvelteKit: Create +error.svelte
, then open the newly created file and notice the deprecation notice over page
import.
Expected behaviour
It should use this template instead:
<script lang="ts">
import { page } from '$app/state';
</script>
<h1>{page.status}: {page.error?.message}</h1>
Where it uses $app/state
module instead of $app/stores
and treat page
as a state instead of a store, so no $
sign
System Info
- OS: Linux
- IDE: VSCode
- v109.4.0
Which package is the issue about?
Svelte for VS Code extension
Additional Information, eg. Screenshots
No response
Metadata
Metadata
Assignees
Labels
feature requestNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers