Skip to content

Commit 8b8dfd9

Browse files
committed
Remove olympians from build (use load() with /static directory)
1 parent 92b4137 commit 8b8dfd9

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

packages/layerchart/src/routes/docs/examples/Histogram/+page.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
2626
import Preview from '$lib/docs/Preview.svelte';
2727
28-
import olympians from '../_data/olympians.json';
28+
export let data;
2929
3030
let thresholds = 10;
3131
3232
$: binByWeight = d3bin()
3333
.value((d) => d.weight)
3434
.thresholds(thresholds);
35-
$: olympiansBins = binByWeight(olympians);
35+
$: olympiansBins = binByWeight(data.olympians);
3636
3737
let selectedGenerator = 'normal';
3838
let randomCount = 1000;

packages/layerchart/src/routes/docs/examples/Histogram/+page.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import pageSource from './+page.svelte?raw';
22

33
export async function load() {
44
return {
5+
olympians: (await fetch('/data/examples/olympians.json')).json(),
56
meta: {
67
pageSource,
78
related: ['components/Bars', 'examples/Bars', 'examples/Columns'],

packages/layerchart/src/routes/docs/examples/_data/olympians.json renamed to packages/layerchart/static/data/examples/olympians.json

File renamed without changes.

0 commit comments

Comments
 (0)