import React from 'react';
import MonacoEditor, { loader } from '@monaco-editor/react';

// 配置 Monaco Editor 使用本地资源
loader.config({
    paths: {
        vs: '/monaco-editor/min/vs'
    },
    'vs/nls': {
        availableLanguages: {
            '*': 'zh-cn'
        }
    }
});

export const Editor = MonacoEditor;
export default Editor; 