fix: use NextJS basePath and WEB_PREFIX to support custom prefix (#19497)
Co-authored-by: johnny0120 <15564476+johnny0120@users.noreply.github.com>
This commit is contained in:
parent
d1c55cb901
commit
49af07f444
33 changed files with 87 additions and 69 deletions
|
|
@ -3,6 +3,7 @@ import type { FC } from 'react'
|
|||
import Editor, { loader } from '@monaco-editor/react'
|
||||
import React, { useEffect, useMemo, useRef, useState } from 'react'
|
||||
import Base from '../base'
|
||||
import { WEB_PREFIX } from '@/config'
|
||||
import cn from '@/utils/classnames'
|
||||
import { CodeLanguage } from '@/app/components/workflow/nodes/code/types'
|
||||
import {
|
||||
|
|
@ -14,7 +15,7 @@ import './style.css'
|
|||
import { noop } from 'lodash-es'
|
||||
|
||||
// load file from local instead of cdn https://github.com/suren-atoyan/monaco-react/issues/482
|
||||
loader.config({ paths: { vs: '/vs' } })
|
||||
loader.config({ paths: { vs: `${WEB_PREFIX}/vs` } })
|
||||
|
||||
const CODE_EDITOR_LINE_HEIGHT = 18
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue