From 2d605304f5414be015b417b546c500340978aefc Mon Sep 17 00:00:00 2001 From: ValeraS Date: Fri, 4 Feb 2022 01:39:47 +0300 Subject: [PATCH] transform only editor.main.js BREAKING CHANGES: if a project contains only these imports for creating editor: ``` import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js'; const editor = monaco.editor.create(...); ``` `monaco-editor-webpack-plugin` will not add features and languages. When creating editor, monaco must be imported from package itself: ``` import * as monaco from 'monaco-editor'; const editor = monaco.editor.create(...); ``` --- webpack-plugin/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack-plugin/src/index.ts b/webpack-plugin/src/index.ts index 529dd044..163be971 100644 --- a/webpack-plugin/src/index.ts +++ b/webpack-plugin/src/index.ts @@ -313,7 +313,7 @@ function createLoaderRules( }; return [ { - test: /esm[/\\]vs[/\\]editor[/\\]editor.(api|main).js/, + test: /esm[/\\]vs[/\\]editor[/\\]editor.main.js/, use: [ { loader: INCLUDE_LOADER_PATH,