-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] monaco editor 升级至 0.53.0 版本 #4028
Comments
由于 monaco 0.53 还未发版。需要自己基于 vscode 最新的 1.95 版本构建出 0.53.0-dev 的 monaco 版本 |
待解决的问题
|
问题记录: monaco 现在都是编译成 esm 文件了,而我们现在还是编译成 commonjs,导致插件进程依赖 monaco 的一些 base 文件运行失败 正常来说插件进程文件是不应该依赖 monaco 的,这块需要进行调整
|
问题探索: 以往的 monaco 版本中都有对功能模块 hack 的部分,这部分是否能放在 OpenSumi 里通过 override 的方式去 hack,仅保留编译部分的改动? |
问题记录: 翻看源码,发现是通过动态 import 加载的某个 js 文件 const url = FileAccess.asBrowserUri(`${moduleId}.js` as AppResourcePath).toString(true);
return import(`${url}`).then((module: { create: IRequestHandlerFactory }) => {
this._requestHandler = module.create(this);
if (!this._requestHandler) {
throw new Error(`No RequestHandler!`);
}
}); 导致文件加载错误 |
修正: map 列表多了一些 d.ts 和 map 文件,导致加载这些文件时产生了报错
|
问题记录: diff 文件打不开
|
已解决,在动态 import 当中添加特殊注释即可,这样就能避免无关文件被打包
见文档:https://webpack.docschina.org/api/module-methods/#dynamic-expressions-in-import |
如果你的需求与问题相关,请在下面描述一下(Is your feature request related to a problem? Please describe.)
描述你预期的功能表现(Describe the solution you'd like)
描述你考虑过的替代方案(Describe alternatives you've considered)
补充信息(Additional context)
The text was updated successfully, but these errors were encountered: