-
Notifications
You must be signed in to change notification settings - Fork 0
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
not working with create-react-app #1
Comments
I have no experience with CRA, is it giving any error at all? or what makes common libraries not compatible with CRA, and what should be done to work with it? |
CRA uses webpack, webpack combines all sources into ONE js file BUT the worker.js is a separate file and so the journey starts... |
oh, I see... well, I thought webpack worked like Parcel, that inlines the worker file and puts it inside the file as a blob url, since it only makes sense in this scenario as in a one-file bundle. but since I have no idea how CRA is configured or if it can be extended, I could only guess that a post-compilation would have to be made to make the patching (the inlining) in the generated file. |
webpack needs at least some kind of import statement to inline the code, but Comlink is called with a string... |
I see, although that's not the defacto way for working with workers, the proper way to initialize them is using |
OK, looks like there is this... |
what do you mean by "without ejecting"? |
CRA manages webpack and babel settings. When you "eject" you remove CRA and can manage all the settings... |
according to the worker-plugin then, I would have to put |
Looks like something like this could be the way to go.... |
@Ognian CRA protect config of webpack from changing... |
Unfortunately this doesn't work with webpack (create-react-app). Any plans to support this?
Thanks
Ognian
The text was updated successfully, but these errors were encountered: