You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you try to use worker-loader in your webpack config, either by ejecting or by patching it into react-scripts/config/webpack.conf.js by other means, and there are any eslint errors in your worker files, your build will pretend to succeed but it will produce no build files other than a copy of the public directory.
Also, it'd be nice if I could use worker-loader without ejecting or patching react-scripts. I mention that in the same issue because it's a concrete repro case for the issue I'm talking about here. I don't know what a solution to this would look like, but if there could be some blessed way to add plugins without ejecting that'd be great. Or create-react-app could ship with configuration for common ones, and enable that configuration if the relevant packages happened to be installed.
Describe alternatives you've considered
I'm already patching this change into my own project because it's really bad for a build system to think it succeeded but not produce a build. I used patch-package to edit the build script without ejecting. I also used patch-package to add worker-loader to my webpack config.
The text was updated successfully, but these errors were encountered:
Is your proposal related to a problem?
If you try to use
worker-loader
in your webpack config, either by ejecting or by patching it intoreact-scripts/config/webpack.conf.js
by other means, and there are any eslint errors in your worker files, your build will pretend to succeed but it will produce no build files other than a copy of thepublic
directory.This is because
react-scripts
doesn't report errors in child loaders. A PR was created to address this a year ago but it still hasn't been merged.. This was originally reported as a problem with usingworkerize-loader
in your project. That issue seems to have been closed prematurely because the related PR never got merged. I haven't usedworkerize-loader
, but I've heard there are some issues with using it in your webpack config as well.Describe the solution you'd like
Merge the PR. Handle errors in child loaders.
Also, it'd be nice if I could use
worker-loader
without ejecting or patchingreact-scripts
. I mention that in the same issue because it's a concrete repro case for the issue I'm talking about here. I don't know what a solution to this would look like, but if there could be some blessed way to add plugins without ejecting that'd be great. Orcreate-react-app
could ship with configuration for common ones, and enable that configuration if the relevant packages happened to be installed.Describe alternatives you've considered
I'm already patching this change into my own project because it's really bad for a build system to think it succeeded but not produce a build. I used
patch-package
to edit the build script without ejecting. I also usedpatch-package
to addworker-loader
to my webpack config.The text was updated successfully, but these errors were encountered: