diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000..f9251a1 --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,10 @@ +import json from '@rollup/plugin-json'; + +export default { + input: 'src/index.js', + output: { + dir: 'output', + format: 'cjs' + }, + plugins: [json()] +}; \ No newline at end of file diff --git a/src/lib/data.ts b/src/lib/data.ts new file mode 100644 index 0000000..38ef0c9 --- /dev/null +++ b/src/lib/data.ts @@ -0,0 +1,5 @@ +export async function getJson(path: string) { + let response = await fetch(path); + let users = await response.json(); + return users; +} \ No newline at end of file diff --git a/src/main.svelte b/src/main.svelte index 2d3dcbd..9e23912 100644 --- a/src/main.svelte +++ b/src/main.svelte @@ -1,5 +1,5 @@
{info.about}
-{info.about}
+