mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 20:52:56 +01:00
Absolute Path will be broken when npm in symlink mode(cnpm)
This commit is contained in:
parent
f166cef0aa
commit
cb473c82aa
1 changed files with 1 additions and 7 deletions
8
index.js
8
index.js
|
|
@ -3,11 +3,6 @@ const webpack = require('webpack');
|
||||||
const AddWorkerEntryPointPlugin = require('./plugins/AddWorkerEntryPointPlugin');
|
const AddWorkerEntryPointPlugin = require('./plugins/AddWorkerEntryPointPlugin');
|
||||||
const INCLUDE_LOADER_PATH = require.resolve('./loaders/include');
|
const INCLUDE_LOADER_PATH = require.resolve('./loaders/include');
|
||||||
|
|
||||||
const MONACO_EDITOR_API_PATHS = [
|
|
||||||
resolveMonacoPath('vs/editor/editor.main'),
|
|
||||||
resolveMonacoPath('vs/editor/editor.api')
|
|
||||||
];
|
|
||||||
const WORKER_LOADER_PATH = resolveMonacoPath('vs/editor/common/services/editorSimpleWorker');
|
|
||||||
const EDITOR_MODULE = {
|
const EDITOR_MODULE = {
|
||||||
label: 'editorWorkerService',
|
label: 'editorWorkerService',
|
||||||
entry: undefined,
|
entry: undefined,
|
||||||
|
|
@ -101,10 +96,9 @@ function createLoaderRules(languages, features, workers, outputPath, publicPath)
|
||||||
};
|
};
|
||||||
})(${JSON.stringify(workerPaths, null, 2)})`,
|
})(${JSON.stringify(workerPaths, null, 2)})`,
|
||||||
};
|
};
|
||||||
|
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
test: MONACO_EDITOR_API_PATHS,
|
test: /monaco-editor\/esm\/vs\/editor\/editor.(api|main).js/,
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: INCLUDE_LOADER_PATH,
|
loader: INCLUDE_LOADER_PATH,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue