diff --git a/docs/components/MethodsMap.vue b/docs/components/MethodsMap.vue index 80cc60c..045edf2 100644 --- a/docs/components/MethodsMap.vue +++ b/docs/components/MethodsMap.vue @@ -7,14 +7,14 @@ import { onMounted, ref, shallowRef, watch } from 'vue' import * as Plot from '@observablehq/plot' import { json } from 'd3' -import { useData } from 'vitepress' +import { useData, withBase } from 'vitepress' import { CountryMethods } from '../../src/data/methods' import { Methods } from '../../src' const isLoading = ref(true) const { isDark } = useData() const map = ref(null) -const dataPath = '../data/countries.geojson' +const dataPath = withBase('/data/countries.geojson') const world = shallowRef(null) onMounted(async () => { diff --git a/docs/data/countries.geojson b/docs/public/data/countries.geojson similarity index 100% rename from docs/data/countries.geojson rename to docs/public/data/countries.geojson diff --git a/vite.config.ts b/vite.config.ts index 3e58a8d..c2db4e7 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,6 +4,7 @@ export default defineConfig({ define: { 'import.meta.vitest': 'undefined', }, + publicDir: 'public', test: { coverage: { provider: 'istanbul', // or 'c8'