Help needed migrating Craco monorepo to RsBuild #3721
-
Hi ! const CracoAlias = require('craco-alias');
module.exports = {
webpack: {
configure: (webpackConfig, { env, paths }) => {
webpackConfig.resolve.fallback = {
querystring: false,
net: false,
};
return webpackConfig;
},
},
jest: {
// jest config
},
plugins: [
{
plugin: CracoAlias,
options: {
source: 'tsconfig',
baseUrl: '.',
tsConfigPath: './tsconfig.paths.json',
},
},
],
}; The module that fails to build with RsBuild is using a web worker and I get the following error:
For the rest, I followed the official guide of migration from CRA with sass and svgr plugins I'm very grateful of any help that can be provided. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Can you provide a reproduction repository or online demo? |
Beta Was this translation helpful? Give feedback.
-
Thanks for your kind words! We can see that the error stack contains "webpack\lib\javascript\ArrayPushCallbackChunkFormatPlugin.js", which is a webpack internal plugin and should not be used in Rspack and Rsbuild projects. This exception is likely related to it. If you can provide a reproduction, we can help further investigate. |
Beta Was this translation helpful? Give feedback.
Thanks for the information, I checked the source code of workerize-loader, it depends on some webpack internal modules so it cannot be used in Rspack or Rsbuild projects. https://github.com/developit/workerize-loader/blob/main/src/index.js#L4-L6
The reproduction is no longer needed, thanks!