Description
Bug report
What is the current behavior?
We have a core library based on React, that used among several applications that built on top of react-scripts
.
Our library contain various heavy computations that used among our applications.
Adding new Worker
construction in library, produces additional chunk in build result (what is quite expected). But when using component from a library that uses this WebWorker does not load worker script (a chunk from library). The WebWorker chunk does not exist in project build.
If the current behavior is a bug, please provide the steps to reproduce.
- Download project:
https://github.com/tsarapke/proj.git
. It use a library with WebWorker:https://github.com/tsarapke/lib
yarn install
yarn start
What is the expected behavior?
Project build should contain WebWorker chunk from a library.
In accordance with provided example - it should print 'Hello World' in console when WebWorker post message.
Other relevant information:
webpack version: webpack version: 5.22.0
Node.js version: v14.15.5
Operating System: Win10
Additional tools: Yarn