Skip to content

Commit eecc4e9

Browse files
authored
build: migrate demo from webpack to Vite (#832)
1 parent 581c66f commit eecc4e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1999
-8662
lines changed

.browserslistrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ pnpm-debug.log*
2222
*.sln
2323
*.sw?
2424

25-
/demo
25+
/demo/dist

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.stackblitzrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 3 deletions

README.zh-Hans.md

Lines changed: 3 additions & 3 deletions

babel.config.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/demo/CodeGen.vue renamed to demo/CodeGen.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import {
44
computed,
55
watch,
66
onBeforeUnmount,
7-
defineProps,
8-
defineEmits,
97
onMounted,
108
nextTick
119
} from "vue";
@@ -16,7 +14,7 @@ import javascript from "highlight.js/lib/languages/javascript";
1614
import typescript from "highlight.js/lib/languages/typescript";
1715
import hljsVuePlugin from "@highlightjs/vue-plugin";
1816
import { initialize, transform } from "esbuild-wasm";
19-
import wasmURL from "esbuild-wasm/esbuild.wasm";
17+
import wasmURL from "esbuild-wasm/esbuild.wasm?url";
2018
import { track } from "@vercel/analytics";
2119
2220
import { getImportsFromOption } from "./utils/codegen";

src/demo/Demo.vue renamed to demo/Demo.vue

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ import { provide, computed, ref, watch } from "vue";
33
import { useUrlSearchParams } from "@vueuse/core";
44
import { use } from "echarts/core";
55
import { CanvasRenderer, SVGRenderer } from "echarts/renderers";
6-
import { INIT_OPTIONS_KEY } from "../ECharts";
6+
import { INIT_OPTIONS_KEY } from "../src/ECharts";
77
import { track } from "@vercel/analytics";
88
9-
import LogoChart from "./examples/LogoChart";
10-
import BarChart from "./examples/BarChart";
11-
import PieChart from "./examples/PieChart";
12-
import PolarChart from "./examples/PolarChart";
13-
import ScatterChart from "./examples/ScatterChart";
14-
import GeoChart from "./examples/GeoChart";
15-
import RadarChart from "./examples/RadarChart";
16-
import ConnectChart from "./examples/ConnectChart";
17-
import GlChart from "./examples/GlChart";
18-
import ManualChart from "./examples/ManualChart";
19-
20-
import CodeGen from "./CodeGen";
9+
import LogoChart from "./examples/LogoChart.vue";
10+
import BarChart from "./examples/BarChart.vue";
11+
import PieChart from "./examples/PieChart.vue";
12+
import PolarChart from "./examples/PolarChart.vue";
13+
import ScatterChart from "./examples/ScatterChart.vue";
14+
import GeoChart from "./examples/GeoChart.vue";
15+
import RadarChart from "./examples/RadarChart.vue";
16+
import ConnectChart from "./examples/ConnectChart.vue";
17+
import GlChart from "./examples/GlChart.vue";
18+
import ManualChart from "./examples/ManualChart.vue";
19+
20+
import CodeGen from "./CodeGen.vue";
2121
2222
use([CanvasRenderer, SVGRenderer]);
2323
Lines changed: 3 additions & 3 deletions

0 commit comments

Comments
 (0)