chore: fix js fetch error
This commit is contained in:
+2
-1
@@ -11,12 +11,13 @@ window.addEventListener('vite:preloadError', () => {
|
||||
})
|
||||
|
||||
const BASE_URL = (window as any).__BASE_URL__ || ''
|
||||
const origin = window.location.origin
|
||||
|
||||
createApp(App)
|
||||
.use(router)
|
||||
.use(VueMonacoEditorPlugin, {
|
||||
paths: {
|
||||
vs: BASE_URL + '/assets/vs'
|
||||
vs: `${origin}${BASE_URL}/assets/vs`
|
||||
}
|
||||
})
|
||||
.mount('#app')
|
||||
|
||||
@@ -97,8 +97,5 @@ export default defineConfig({
|
||||
}
|
||||
},
|
||||
define: {
|
||||
// Define MONACO_BASE_URL for monaco-editor to correctly load its workers and assets
|
||||
// This path should match the destination of viteStaticCopy for monaco-editor's 'vs' folder
|
||||
MONACO_BASE_URL: JSON.stringify('./assets/vs')
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user