eruda
This commit is contained in:
32
src/main.ts
32
src/main.ts
@ -9,11 +9,27 @@ import App from './App.vue';
|
||||
import { router } from './router';
|
||||
import { DataLoaderPlugin } from 'unplugin-vue-router/data-loaders';
|
||||
|
||||
createApp(App)
|
||||
.use(createHead())
|
||||
.use(createPinia())
|
||||
// Register the plugin before the router
|
||||
.use(DataLoaderPlugin, { router })
|
||||
// adding the router will trigger the initial navigation
|
||||
.use(router)
|
||||
.mount('#app');
|
||||
async function init() {
|
||||
if (import.meta.env.MODE === 'development' || 1 === 1) {
|
||||
// https://eruda.liriliri.io/zh/docs/#快速上手
|
||||
await import('eruda').then(({ default: eruda }) => {
|
||||
eruda.init({
|
||||
defaults: {
|
||||
transparency: 0.9,
|
||||
},
|
||||
});
|
||||
eruda.show();
|
||||
});
|
||||
}
|
||||
|
||||
createApp(App)
|
||||
.use(createHead())
|
||||
.use(createPinia())
|
||||
// Register the plugin before the router
|
||||
.use(DataLoaderPlugin, { router })
|
||||
// adding the router will trigger the initial navigation
|
||||
.use(router)
|
||||
.mount('#app');
|
||||
}
|
||||
|
||||
init();
|
||||
|
Reference in New Issue
Block a user