-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
index.js
30 lines (27 loc) · 849 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { install as VueMonacoEditorPlugin } from '@guolao/vue-monaco-editor';
import defaultTheme from 'vitepress/theme';
import Layout from './Layout.vue';
import { createDialect } from './dialect';
import { createDarkMode } from './dark-mode';
import SqlOutput from './SqlOutput.vue';
import Playground from './Playground.vue';
import './styles.css';
// @todo: hack, vite.config.ts define option seem not to work
globalThis.process = globalThis.process || {
env: {},
};
export default {
Layout,
NotFound: defaultTheme.NotFound,
enhanceApp({ app }) {
createDialect(app);
createDarkMode(app);
app.component('SqlOutput', SqlOutput);
app.component('Playground', Playground);
app.use(VueMonacoEditorPlugin, {
paths: {
vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.44.0/min/vs',
},
});
},
};