docs: Import .svelte.js files with explicit extension. (#14584)

pull/14592/head
brunnerh 3 weeks ago committed by GitHub
parent 8433a7169b
commit ad87572adc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -49,7 +49,7 @@ export const userState = $state({
```svelte ```svelte
<!--- file: App.svelte ---> <!--- file: App.svelte --->
<script> <script>
import { userState } from './state.svelte'; import { userState } from './state.svelte.js';
</script> </script>
<p>User name: {userState.name}</p> <p>User name: {userState.name}</p>

@ -22,7 +22,7 @@ export const myGlobalState = $state({
```svelte ```svelte
<!--- file: App.svelte ---> <!--- file: App.svelte --->
<script> <script>
import { myGlobalState } from './state.svelte'; import { myGlobalState } from './state.svelte.js';
// ... // ...
</script> </script>
``` ```

Loading…
Cancel
Save