mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-12-14 05:54:19 +08:00
build: migrate demo from webpack to Vite (#832)
This commit is contained in:
21
demo/main.ts
Normal file
21
demo/main.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { inject } from "@vercel/analytics";
|
||||
import { createApp } from "vue";
|
||||
import { createPinia } from "pinia";
|
||||
import Demo from "./Demo.vue";
|
||||
|
||||
const SAMPLE_RATE = 0.5;
|
||||
|
||||
inject({
|
||||
beforeSend: event => {
|
||||
if (Math.random() > SAMPLE_RATE) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return event;
|
||||
}
|
||||
});
|
||||
|
||||
const pinia = createPinia();
|
||||
const app = createApp(Demo);
|
||||
app.use(pinia);
|
||||
app.mount("#app");
|
||||
Reference in New Issue
Block a user