File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,26 @@ import { NoOpNotification as MonacoNoOpNotification } from 'monaco-editor/esm/vs
2121import { NoOpNotification as VScodeNoOpNotification } from 'vscode/vs/platform/notification/common/notification.js'
2222import { Registry } from 'vs/platform/registry/common/platform'
2323import { Extensions , IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'
24+ import { StandaloneConfigurationService } from 'vs/editor/standalone/browser/standaloneServices'
25+ import { IConfigurationModel } from 'vs/platform/configuration/common/configuration'
26+
27+ // Monaco build process treeshaking is very aggressive and everything that is not used in monaco is removed
28+ // Unfortunately, it makes some class not respect anymore the interface they are supposed to implement
29+ // In this file we are restoring some method that are treeshaked out of monaco-editor but that are needed in this library
30+
31+ StandaloneConfigurationService . prototype . getConfigurationData ??= ( ) => {
32+ const emptyModel : IConfigurationModel = {
33+ contents : { } ,
34+ keys : [ ] ,
35+ overrides : [ ]
36+ }
37+ return {
38+ defaults : emptyModel ,
39+ user : emptyModel ,
40+ workspace : emptyModel ,
41+ folders : [ ]
42+ }
43+ }
2444
2545const configurationRegistry = Registry . as < IConfigurationRegistry > ( Extensions . Configuration )
2646// @ts -ignore Override of a readonly property
You can’t perform that action at this time.
0 commit comments