microsoft / monaco-editor-webpack-plugin

Moved to https://github.com/microsoft/monaco-editor
483 stars 99 forks source link

trouble when trying to use monaco-editor on my own server #138

Closed wu23873chen closed 3 years ago

wu23873chen commented 3 years ago

I want to use monaco-editor on my own server.I'v installed it with npm,write my index.html and my index.js as reqiured.But when I open my website in the browser,I can see nothing.Here is the output of the browser(mozilla firefox).(It doesn't work on edge either.)

And,where should I put editor.webpack.js?

And you can see my website(if necessary) at https://manage.kevinwc.cn/code.

Please help me,thanks.

(the console log is as following)

GEThttps://manage.kevinwc.cn/code/ [HTTP/2 304 Not Modified 16ms]

GEThttps://manage.kevinwc.cn/code/index.js [HTTP/2 200 OK 8ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/editor.api.js [HTTP/2 200 OK 10ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/config/editorOptions.js [HTTP/2 200 OK 58ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/standalone/standaloneBase.js [HTTP/2 200 OK 20ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/browser/standaloneEditor.js [HTTP/2 200 OK 18ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/browser/standaloneLanguages.js [HTTP/2 200 OK 20ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/base/common/cancellation.js [HTTP/2 200 OK 15ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/base/common/event.js [HTTP/2 200 OK 23ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/base/common/keyCodes.js [HTTP/2 200 OK 14ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/base/common/uri.js [HTTP/2 200 OK 14ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/core/position.js [HTTP/2 200 OK 12ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/core/range.js [HTTP/2 200 OK 17ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/core/selection.js [HTTP/2 200 OK 13ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/core/token.js [HTTP/2 200 OK 14ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js [HTTP/2 200 OK 15ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css [HTTP/2 200 OK 9ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js [HTTP/2 200 OK 10ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/browser/widget/diffNavigator.js [HTTP/2 200 OK 12ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/browser/services/openerService.js [HTTP/2 200 OK 11ms]

已拦截载入自“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css”的模块,它使用了不允许的 MIME 类型(“text/css”)。 code 来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css”的模块载入失败。 code:7:1 来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js”的模块载入失败。 code:7:1 GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/config/fontInfo.js [HTTP/2 200 OK 11ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/editorCommon.js [HTTP/2 200 OK 10ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/model.js [HTTP/2 200 OK 10ms]

来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/browser/services/openerService.js”的模块载入失败。 code:7:1 GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/modes.js [HTTP/2 200 OK 16ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/modes/nullMode.js [HTTP/2 200 OK 21ms]

来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/browser/widget/diffNavigator.js”的模块载入失败。 code:7:1 来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/config/fontInfo.js”的模块载入失败。 code:7:1 GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js [HTTP/2 200 OK 15ms]

来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/editorCommon.js”的模块载入失败。 code:7:1 GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/services/webWorker.js [HTTP/2 200 OK 19ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/services/resolverService.js [HTTP/2 200 OK 14ms]

来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/model.js”的模块载入失败。 code:7:1 GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/browser/colorizer.js [HTTP/2 200 OK 18ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js [HTTP/2 200 OK 13ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/browser/simpleServices.js [HTTP/2 200 OK 16ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js [HTTP/2 200 OK 8ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js [HTTP/2 200 OK 13ms]

来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/modes.js”的模块载入失败。 code:7:1 GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/commands/common/commands.js [HTTP/2 200 OK 9ms]

来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/modes/nullMode.js”的模块载入失败。 code:7:1 来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js”的模块载入失败。 code:7:1 来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/services/resolverService.js”的模块载入失败。 code:7:1 GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/configuration/common/configuration.js [HTTP/2 200 OK 11ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js [HTTP/2 200 OK 15ms]

来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/services/webWorker.js”的模块载入失败。 code:7:1 来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/browser/colorizer.js”的模块载入失败。 code:7:1 来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/browser/simpleServices.js”的模块载入失败。 code:7:1 来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js”的模块载入失败。 code:7:1 来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js”的模块载入失败。 code:7:1 来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/commands/common/commands.js”的模块载入失败。 code:7:1 来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js”的模块载入失败。 code:7:1 来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/configuration/common/configuration.js”的模块载入失败。 code:7:1 来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js”的模块载入失败。 code:7:1 GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/contextview/browser/contextView.js [HTTP/2 200 OK 9ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js [HTTP/2 200 OK 15ms]

来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/contextview/browser/contextView.js”的模块载入失败。 code:7:1 GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js [HTTP/2 200 OK 10ms]

来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js”的模块载入失败。 code:7:1 来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js”的模块载入失败。 code:7:1 GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/notification/common/notification.js [HTTP/2 200 OK 11ms]

来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/notification/common/notification.js”的模块载入失败。 code:7:1 GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/opener/common/opener.js [HTTP/2 200 OK 34ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js [HTTP/2 200 OK 14ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/browser/config/configuration.js [HTTP/2 200 OK 10ms]

来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js”的模块载入失败。 code:7:1 来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/opener/common/opener.js”的模块载入失败。 code:7:1 GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/progress/common/progress.js [HTTP/2 200 OK 9ms]

来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/browser/config/configuration.js”的模块载入失败。 code:7:1 来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/progress/common/progress.js”的模块载入失败。 code:7:1 GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js [HTTP/2 200 OK 9ms]

来源为“https://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js”的模块载入失败。 code:7:1 GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/base/common/platform.js [HTTP/2 200 OK 10ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/nls.js [HTTP/2 200 OK 10ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/model/wordHelper.js [HTTP/2 200 OK 10ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js [HTTP/2 200 OK 16ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js [HTTP/2 200 OK 14ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCompile.js [HTTP/2 200 OK 20ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchLexer.js [HTTP/2 200 OK 17ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/base/common/lifecycle.js [HTTP/2 304 Not Modified 14ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/base/common/errors.js [HTTP/2 304 Not Modified 14ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/base/common/linkedList.js [HTTP/2 304 Not Modified 11ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/base/common/path.js [HTTP/2 304 Not Modified 34ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/platform/registry/common/platform.js [HTTP/2 304 Not Modified 10ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/base/common/strings.js [HTTP/2 304 Not Modified 16ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js [HTTP/2 304 Not Modified 12ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/modes/supports.js [HTTP/2 304 Not Modified 12ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/modes/supports/characterPair.js [HTTP/2 304 Not Modified 9ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/modes/supports/indentRules.js [HTTP/2 304 Not Modified 18ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/modes/supports/electricCharacter.js [HTTP/2 304 Not Modified 11ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/modes/supports/onEnter.js [HTTP/2 304 Not Modified 9ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/modes/supports/richEditBrackets.js [HTTP/2 304 Not Modified 9ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCommon.js [HTTP/2 304 Not Modified 21ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/base/common/iterator.js [HTTP/2 304 Not Modified 14ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/base/common/process.js [HTTP/2 304 Not Modified 129ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/base/common/assert.js [HTTP/2 304 Not Modified 156ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/base/common/types.js [HTTP/2 304 Not Modified 140ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/editor/common/core/stringBuilder.js [HTTP/2 304 Not Modified 215ms]

GEThttps://manage.kevinwc.cn/code/monaco-editor/esm/vs/base/common/buffer.js [HTTP/2 304 Not Modified 64ms]

GEThttps://manage.kevinwc.cn/favicon.ico [HTTP/2 404 Not Found 0ms]

alexdima commented 3 years ago

@wu23873chen I recommend that you start with one of the samples that show the most common ways to load the editor:

There you can see different techniques for each variant.

This complete example shows how to use webpack and this plugin (monaco-editor-webpack-plugin).

wu23873chen commented 3 years ago

I can hardly understand.....Actually,I haven't used node.js before.......Can monaco-editor run with Internet Information Service on Windows?

wu23873chen commented 3 years ago

OK, I can admit that I'm stupid, so I simply copy one of the samples to my public-folder, and it seems to be working!

Thanks~

wu23873chen commented 3 years ago

But now I have another question······😢

So,can you give me some more instruction about how to use monaco-editor by coding my self instead of simply copying the samples? I found out that it's too diffucult for me to understand, maybe I (not necessary but) need to study node.js and a lot of other things······or can you just post me some files that can be use directly and can change options like language by following some easy steps?

please~

alexdima commented 3 years ago

@wu23873chen I am sorry, I cannot offer consulting like this. You can start with a sample and you need to understand the techniques used in the sample and apply those same techniques to your project, depending on your project structure.

wu23873chen commented 3 years ago

All right,thank you