From 0d54f7b8dd64224427255eb4e396416a59dec0ef Mon Sep 17 00:00:00 2001 From: Colin Grant Date: Tue, 29 Mar 2022 08:39:18 -0600 Subject: [PATCH 1/2] Load script in body --- .../application-manager/src/generator/frontend-generator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev-packages/application-manager/src/generator/frontend-generator.ts b/dev-packages/application-manager/src/generator/frontend-generator.ts index 6cdedd87f2bbf..f5a69730f096e 100644 --- a/dev-packages/application-manager/src/generator/frontend-generator.ts +++ b/dev-packages/application-manager/src/generator/frontend-generator.ts @@ -50,11 +50,11 @@ export class FrontendGenerator extends AbstractGenerator { ${this.compileIndexHead(frontendModules)} - -
${this.compileIndexPreload(frontendModules)}
+
${this.compileIndexPreload(frontendModules)}
+ `; From 78a8b1eec9482ddea6110f46859f2767cef34896 Mon Sep 17 00:00:00 2001 From: Colin Grant Date: Tue, 29 Mar 2022 08:49:32 -0600 Subject: [PATCH 2/2] add migration note --- doc/Migration.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/Migration.md b/doc/Migration.md index c515947a0af32..a7493f02aa72c 100644 --- a/doc/Migration.md +++ b/doc/Migration.md @@ -47,6 +47,7 @@ Two kinds of changes may be required to consume Monaco using ESM modules. - If your application uses its own Webpack config rather than that generated by the @theia/dev-packages, you will need to update that config to remove the `CopyWebpackPlugin` formerly used to place Monaco code in the build folder and to build a separate entrypoint for the `editor.worker`. See [the changes here](https://github.com/eclipse-theia/theia/pull/10736/files#diff-b4677f3ff57d8b952eeefc10493ed3600d2737f9b5c9b0630b172472acb9c3a2) + - If your application uses its own frontend generator, you should modify the code that generates the `index.html` to load the `script` containing the bundle into the `body` element rather than the head. See [changes here](https://github.com/eclipse-theia/theia/pull/10947/files) - References to the `window.monaco` object should be replaced with imports from `@theia/monaco-editor-core`. In most cases, simply adding an import `import * as monaco from '@theia/monaco-editor-core'` will suffice. More complex use cases may require imports from specific parts of Monaco. Please see [the PR](https://github.com/eclipse-theia/theia/pull/10736) for details, and please post any questions or problems there.