mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 13:55:41 +01:00
Adopt loader-utils breaking changes
This commit is contained in:
parent
ed1ee25b7b
commit
009bc9b864
2 changed files with 26 additions and 12 deletions
|
|
@ -6,6 +6,7 @@ import { AddWorkerEntryPointPlugin } from './plugins/AddWorkerEntryPointPlugin';
|
|||
import { languagesArr, EditorLanguage } from './languages';
|
||||
import { featuresArr, EditorFeature, NegatedEditorFeature } from './features';
|
||||
import { IFeatureDefinition } from './types';
|
||||
import { ILoaderOptions } from './loaders/include';
|
||||
|
||||
const INCLUDE_LOADER_PATH = require.resolve('./loaders/include');
|
||||
|
||||
|
|
@ -282,17 +283,18 @@ function createLoaderRules(
|
|||
};
|
||||
})(${JSON.stringify(workerPaths, null, 2)})`
|
||||
};
|
||||
const options: ILoaderOptions = {
|
||||
globals,
|
||||
pre: featurePaths.map((importPath) => resolveMonacoPath(importPath, monacoEditorPath)),
|
||||
post: languagePaths.map((importPath) => resolveMonacoPath(importPath, monacoEditorPath))
|
||||
};
|
||||
return [
|
||||
{
|
||||
test: /esm[/\\]vs[/\\]editor[/\\]editor.(api|main).js/,
|
||||
use: [
|
||||
{
|
||||
loader: INCLUDE_LOADER_PATH,
|
||||
options: {
|
||||
globals,
|
||||
pre: featurePaths.map((importPath) => resolveMonacoPath(importPath, monacoEditorPath)),
|
||||
post: languagePaths.map((importPath) => resolveMonacoPath(importPath, monacoEditorPath))
|
||||
}
|
||||
options
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue