标签:def rip 添加 aml number htm reac plugin rom
yarn add monaco-editor
、yarn add monaco-editor-webpack-plugin
、yarn add react-monaco-editor
chainWebpack
配置import MonacoWebpackPlugin from 'monaco-editor-webpack-plugin';
...
const chainWebpack = (config, { webpack }) => {
config.plugin('monaco-editor').use(MonacoWebpackPlugin, [
{
languages: ['yaml']
}
])
};
export default{
...
chainWebpack
}
<Monaco
width="100%"
height="100%"
language="yaml"
theme="vs-light"
value={code}
options={{ selectOnLineNumbers: true }}
/>
在 umijs 项目中使用 Monaco Editor 的配置
标签:def rip 添加 aml number htm reac plugin rom
原文地址:https://www.cnblogs.com/zengande/p/11505505.html