build: migrate demo from webpack to Vite (#832)

This commit is contained in:
Yue JIN
2025-05-25 00:24:38 +08:00
committed by GitHub
parent 581c66f82a
commit eecc4e9405
52 changed files with 745 additions and 7408 deletions

21
demo/main.ts Normal file
View 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");