From cb473c82aa9165d06df27b6b3ee3cf24f7829281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=9B=E8=82=9A?= Date: Thu, 30 Aug 2018 20:48:19 +0800 Subject: [PATCH] Absolute Path will be broken when npm in symlink mode(cnpm) --- index.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/index.js b/index.js index 6ac6460f..414e9aec 100644 --- a/index.js +++ b/index.js @@ -3,11 +3,6 @@ const webpack = require('webpack'); const AddWorkerEntryPointPlugin = require('./plugins/AddWorkerEntryPointPlugin'); 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 = { label: 'editorWorkerService', entry: undefined, @@ -101,10 +96,9 @@ function createLoaderRules(languages, features, workers, outputPath, publicPath) }; })(${JSON.stringify(workerPaths, null, 2)})`, }; - return [ { - test: MONACO_EDITOR_API_PATHS, + test: /monaco-editor\/esm\/vs\/editor\/editor.(api|main).js/, use: [ { loader: INCLUDE_LOADER_PATH,