Skip to content

npx create-react-app with react-app-rewired not finding Workers #52

Description

@qsc-jhndnn

I've created a React project with npx create-react-app and am attempting to use the threads-plugin with react-app-rewired. When I call npm start I get the following warning

WARNING in No instantiations of threads.js workers found.
Please check that:
  1. You have configured Babel / TypeScript to not transpile ES modules
  2. You import `Worker` from `threads` where you use it

For more details see: https://github.com/andywer/threads-plugin

When I attempt to use the worker it errors out with the error

Uncaught SyntaxError: Unexpected token '<'

which I think it due to the plugin not packaging the worker correctly and the call to retrieve the JS is returning HTML.

I've created an example project here - https://github.com/qsc-jhndnn/thread-test.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions