Skip to content

Commit 7bdfc72

Browse files
committed
build(webpack): allow configurable worker paths
1 parent c17250f commit 7bdfc72

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

packages/react-scripts/config/webpack.config.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,12 @@ module.exports = function (webpackEnv) {
221221
entry: {
222222
main: paths.appIndexJs,
223223
'apidom.worker': path.join(
224-
paths.appSrc,
225-
'plugins',
226-
'editor-monaco-language-apidom',
227-
'language',
228-
'apidom.worker.js'
224+
paths.appPath,
225+
process.env.REACT_APP_APIDOM_WORKER_PATH
229226
),
230-
'editor.worker': require.resolve(
231-
'monaco-editor/esm/vs/editor/editor.worker.js'
227+
'editor.worker': path.join(
228+
paths.appPath,
229+
process.env.REACT_APP_EDITOR_WORKER_PATH
232230
),
233231
},
234232
externals: {
@@ -347,6 +345,7 @@ module.exports = function (webpackEnv) {
347345
// Support React Native Web
348346
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
349347
'react-native': 'react-native-web',
348+
'react/jsx-runtime.js': 'react/jsx-runtime',
350349
// Allows for better profiling with ReactDevTools
351350
...(isEnvProductionProfile && {
352351
'react-dom$': 'react-dom/profiling',

0 commit comments

Comments
 (0)