mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-23 22:31:10 +03:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1631a21534 | ||
|
|
2c30f830e9 |
No files matched your search
@@ -4,9 +4,6 @@ import { createHead } from '@vueuse/head';
|
||||
import { library } from '@fortawesome/fontawesome-svg-core';
|
||||
import { fas } from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
import { install as VueMonacoEditorPlugin, loader } from '@guolao/vue-monaco-editor';
|
||||
import * as monaco from 'monaco-editor';
|
||||
|
||||
import { registerSW } from 'virtual:pwa-register';
|
||||
import shadow from 'vue-shadow-dom';
|
||||
import { plausible } from './plugins/plausible.plugin';
|
||||
@@ -23,14 +20,10 @@ import store from './tools/pomodoro-timer/app/store';
|
||||
|
||||
library.add(fas);
|
||||
|
||||
// loaded monaco-editor from `node_modules`
|
||||
loader.config({ monaco });
|
||||
|
||||
registerSW();
|
||||
|
||||
const app = createApp(App);
|
||||
|
||||
app.use(VueMonacoEditorPlugin);
|
||||
app.use(createPinia());
|
||||
app.use(createHead());
|
||||
app.use(i18nPlugin);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import * as monacoEditor from 'monaco-editor';
|
||||
import { VueMonacoEditor, loader } from '@guolao/vue-monaco-editor';
|
||||
import type { MonacoEditor } from '@guolao/vue-monaco-editor';
|
||||
import EditorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker';
|
||||
import JsonWorker from 'monaco-editor/esm/vs/language/json/json.worker?worker';
|
||||
@@ -53,6 +54,9 @@ globalThis.MonacoEnvironment = {
|
||||
},
|
||||
};
|
||||
|
||||
// loaded monaco-editor from `node_modules`
|
||||
loader.config({ monaco: monacoEditor });
|
||||
|
||||
export interface EditorProps {
|
||||
defaultValue?: string
|
||||
defaultPath?: string
|
||||
@@ -113,7 +117,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<vue-monaco-editor
|
||||
<VueMonacoEditor
|
||||
v-bind="inheritedAttrs"
|
||||
v-model:value="value"
|
||||
@before-mount="(monaco: MonacoEditor) => emits('beforeMount', monaco)"
|
||||
|
||||
+2
-2
@@ -130,13 +130,13 @@ export default defineConfig({
|
||||
minify: !process.env.VERCEL,
|
||||
reportCompressedSize: !process.env.VERCEL,
|
||||
// cssMinify: false,
|
||||
modulePreload: false,
|
||||
// modulePreload: false,
|
||||
rollupOptions: {
|
||||
external: ['regex', './out/isolated_vm', 'isolated-vm', 'onnxruntime-node'],
|
||||
output: {
|
||||
format: 'es',
|
||||
manualChunks: (id) => {
|
||||
if (id.includes('monaco-editor')) return 'monaco-editor';
|
||||
// if (id.includes('monaco-editor')) return 'monaco-editor';
|
||||
if (id.includes('tesseract.js')) return 'tesseract.js';
|
||||
if (id.includes('pdfjs')) return 'pdfjs';
|
||||
if (id.includes('unicode')) return 'unicode';
|
||||
|
||||
Reference in new issue
Block a user