Skip to content

Commit cf50fc9

Browse files
authored
[docs] Add a warning about the issue with overwriting defaults (#256)
1 parent 90aaf35 commit cf50fc9

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.changeset/funky-pigs-trade.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"docs2": patch
3+
---
4+
5+
Add a warning about the issue with overwriting defaults

apps/docs2/src/content/docs/guides/reusable-defaults.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ resolver, theme, validator, merger and translation.
1616

1717
And use it like this:
1818

19+
:::caution
20+
21+
At the moment, Svelte has an [issue](https://github.com/sveltejs/svelte/issues/17220)
22+
with overwriting module properties during SSR.
23+
As a workaround, you can use a shallow clone or `export const defaults = { ... }`
24+
in a `defaults` file.
25+
26+
:::
27+
1928
```typescript
2029
import * as defaults from '$lib/form/defaults'
2130

0 commit comments

Comments
 (0)