Skip to content

Support worker-loader and report errors in child loaders #8765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nickretallack opened this issue Apr 1, 2020 · 0 comments
Open

Support worker-loader and report errors in child loaders #8765

nickretallack opened this issue Apr 1, 2020 · 0 comments

Comments

@nickretallack
Copy link

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 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.

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 using workerize-loader in your project. That issue seems to have been closed prematurely because the related PR never got merged. I haven't used workerize-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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant