Skip to content

Commit

Permalink
feat(website): Lazy load ace theme
Browse files Browse the repository at this point in the history
  • Loading branch information
yamadashy committed Jan 26, 2025
1 parent 30a264f commit 3b02706
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions website/client/components/TryItResultViewer.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<script setup lang="ts">
import type { Ace } from 'ace-builds';
import ace, { type Ace } from 'ace-builds';
import { Copy, Download } from 'lucide-vue-next';
import { useData } from 'vitepress';
import { computed, onMounted, ref, watch } from 'vue';
import { VAceEditor } from 'vue3-ace-editor';
import { computed, onMounted, ref, watch, defineAsyncComponent } from 'vue';
import type { PackResult } from './api/client.js';
import { VAceEditor } from 'vue3-ace-editor';
import { copyToClipboard, downloadResult, formatTimestamp, getEditorOptions } from './utils/resultViewer.js';
import 'ace-builds/src-noconflict/theme-tomorrow';
import 'ace-builds/src-noconflict/theme-tomorrow_night';
import themeTomorrowUrl from 'ace-builds/src-noconflict/theme-tomorrow?url';
import themeTomorrowNightUrl from 'ace-builds/src-noconflict/theme-tomorrow_night?url';
ace.config.setModuleUrl('ace/theme/tomorrow', themeTomorrowUrl);
ace.config.setModuleUrl('ace/theme/tomorrow_night', themeTomorrowNightUrl);
const lightTheme = 'tomorrow';
const darkTheme = 'tomorrow_night';
Expand Down

0 comments on commit 3b02706

Please sign in to comment.