sveltekit-data-plugin 1.0.1 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +2 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -46,8 +46,8 @@ Then you can import a markdown file in a `page.js`, or whatever, like
46
46
  export async function load() {
47
47
  const data = await import('$data/home.md');
48
48
 
49
- return data;
49
+ return {...data};
50
50
  }
51
51
  ```
52
52
 
53
- And you will get a front-matter parsed markdown file
53
+ And you will get a front-matter parsed markdown file. The `await` and subsequent spread are necessary, to satisfy sveltekit because the import pulls in the data as getters and throws an error
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sveltekit-data-plugin",
3
- "version": "1.0.1",
3
+ "version": "1.1.1",
4
4
  "author": {
5
5
  "name": "Jonny Thaw",
6
6
  "url": "https://jthaw.me"