我在monaco-editor@0.10.0
中使用electron
,我为我的案例扩展了以下示例
https://github.com/Microsoft/monaco-editor-samples/blob/master/sample-electron/index.html
我想知道是否有办法为require
和import
语句设置工作目录。
例如。我有文件dependency.js
,我希望在编辑器中自动完成以下语句:
import dep from './dependency.js'
我尝试使用选项baseUrl
,rootDirs
设置typescript / javascript编译器,但未成功。
baseUrl: 'file://pathToDir/'
//or
rootDirs: ['file://pathToDir/']