diff --git a/index.js b/index.js index c4f2c39d..6ac6460f 100644 --- a/index.js +++ b/index.js @@ -120,9 +120,6 @@ function createLoaderRules(languages, features, workers, outputPath, publicPath) } function createPlugins(workers, outputPath) { - const workerFallbacks = workers.reduce((acc, { id, fallback }) => (fallback ? Object.assign(acc, { - [id]: resolveMonacoPath(fallback) - }) : acc), {}); return ( [] .concat(uniqBy(workers, ({ id }) => id).map(({ id, entry, output }) => @@ -131,20 +128,10 @@ function createPlugins(workers, outputPath) { entry: resolveMonacoPath(entry), filename: path.join(outputPath, output), plugins: [ - createContextPlugin(WORKER_LOADER_PATH, {}), new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 }), ], }) )) - .concat(workerFallbacks ? [createContextPlugin(WORKER_LOADER_PATH, workerFallbacks)] : []) - ); -} - -function createContextPlugin(filePath, contextPaths) { - return new webpack.ContextReplacementPlugin( - new RegExp(`^${path.dirname(filePath).replace(/[\/\\]/g, '(/|\\\\)')}$`), - '', - contextPaths ); } diff --git a/package-lock.json b/package-lock.json index 90b60172..b47e46d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2765,9 +2765,9 @@ } }, "monaco-editor": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.14.1.tgz", - "integrity": "sha512-a73LapNgGxSHW0TOor9IkOvyFG5t0zupXb+sGrx7UMkMif/Ql/Fc9QXYZ26GLx80GHMmDVTZN4lBINzXltAhUg==", + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.14.2.tgz", + "integrity": "sha512-SgWGZtoUcb+34gK/aEoqRpJ8/zKp19j1zqP2rZlT75pGHQoM3EIGZH7Qrlp6n5RWDySGVNdxlvsoecs5SghJ3A==", "dev": true }, "move-concurrently": { diff --git a/package.json b/package.json index cea7a7e8..70dff27d 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ }, "devDependencies": { "css-loader": "^1.0.0", - "monaco-editor": "^0.14.1", + "monaco-editor": "^0.14.2", "style-loader": "^0.22.1", "webpack": "^4.16.5", "webpack-cli": "^3.1.0"