File tree 3 files changed +17
-5
lines changed
3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,14 @@ npm install @codingame/monaco-editor-wrapper
32
32
### Usage
33
33
34
34
:warning : You should NEVER import ` monaco-editor ` directly in your code.
35
- ` monaco-editor/esm/vs/editor/edcore.main ` should be used instead or Monaco will load all languages/worker and break the loading.
35
+ ` monaco-editor/esm/vs/editor/editor.api ` should be used instead or Monaco will load all languages/worker and break the loading.
36
36
There are 2 solutions:
37
37
- if webpack is used, a resolve alias can be used:
38
38
``` javascript
39
39
{
40
40
resolve: {
41
41
alias: {
42
- ' monaco-editor$' : require .resolve (' monaco-editor/esm/vs/editor/edcore.main ' )
42
+ ' monaco-editor$' : require .resolve (' monaco-editor/esm/vs/editor/editor.api ' )
43
43
}
44
44
}
45
45
}
Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ export default rollup.defineConfig({
44
44
dir : 'dist' ,
45
45
format : 'esm' ,
46
46
paths : {
47
- 'monaco-editor' : 'monaco-editor/esm/vs/editor/edcore.main ' ,
48
- 'monaco-editor-core' : 'monaco-editor/esm/vs/editor/edcore.main '
47
+ 'monaco-editor' : 'monaco-editor/esm/vs/editor/editor.api ' ,
48
+ 'monaco-editor-core' : 'monaco-editor/esm/vs/editor/editor.api '
49
49
} ,
50
50
entryFileNames : ( module ) => {
51
51
const name = path . join (
@@ -101,7 +101,7 @@ export default rollup.defineConfig({
101
101
replacement : 'monaco-editor/'
102
102
} , {
103
103
find : / ^ ( m o n a c o - e d i t o r | m o n a c o - e d i t o r - c o r e ) $ / ,
104
- replacement : 'monaco-editor/esm/vs/editor/edcore.main '
104
+ replacement : 'monaco-editor/esm/vs/editor/editor.api '
105
105
} ]
106
106
} ) ,
107
107
string ( {
Original file line number Diff line number Diff line change @@ -6,6 +6,16 @@ import TextModelService from './services/TextModelService'
6
6
import './worker'
7
7
import setupExtensions from './extensions'
8
8
9
+ import 'monaco-editor/esm/vs/editor/editor.all'
10
+ import 'monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp'
11
+ import 'monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard'
12
+ import 'monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens'
13
+ import 'monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess'
14
+ import 'monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess'
15
+ import 'monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess'
16
+ import 'monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess'
17
+ import 'monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch'
18
+
9
19
monaco . extra . StandaloneServices . initialize ( {
10
20
get textModelService ( ) {
11
21
return new TextModelService ( monaco . extra . StandaloneServices . get ( monaco . extra . IModelService ) )
@@ -18,6 +28,8 @@ monaco.extra.StandaloneServices.initialize({
18
28
)
19
29
}
20
30
} )
31
+ // Disable high contrast autodetection because it fallbacks on the hc-black no matter what
32
+ monaco . extra . StandaloneServices . get ( monaco . editor . IStandaloneThemeService ) . setAutoDetectHighContrast ( false )
21
33
22
34
// Force EOL to be '\n' even on Windows
23
35
const configurationService = monaco . extra . StandaloneServices . get ( monaco . extra . IConfigurationService )
You can’t perform that action at this time.
0 commit comments