Skip to content
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

Fix Example App for web #230

Closed
wants to merge 2 commits into from
Closed

Conversation

Kicu
Copy link
Contributor

@Kicu Kicu commented Jan 8, 2025

Details

While doing some testing of this library I have found that the Example for web (run via yarn web) was broken because of wrong webpack config.
I have no idea when it broke - it was like that before RN 75 migration and after it as well.
Btw @gedu did you try running it on your end when migrating to 75 here? #228 I wonder why it worked for you and not for me :/

Anyways on clean installs it did not work, and after I add this webpack config it does work.

Also a question - running yarn install on root level generates a yarn.lock file because it was missing. Was this on purpose?

What this fixes

The error:

$ webpack serve
<i> [webpack-dev-server] Project is running at:
[...redacted...]

ERROR in ./node_modules/@react-native/assets-registry/registry.js 13:7
Module parse failed: Unexpected token (13:7)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| 'use strict';
[...]

So I added a simple webpack loader accepting .js files.

Checklist

  • I have described the bug/issue
  • I have provided reproduction in Example App
  • I have tested that solution works on Example App on all platforms:
    • Android
    • iOS
    • Web

Screenshots/Videos

Screenshot 2025-01-08 at 09 28 56

Copy link

github-actions bot commented Jan 8, 2025


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@Kicu
Copy link
Contributor Author

Kicu commented Jan 8, 2025

CC @gedu @mountiny @luacmartins please take a look at this

@Kicu
Copy link
Contributor Author

Kicu commented Jan 8, 2025

I have read the CLA Document and I hereby sign the CLA

@Kicu
Copy link
Contributor Author

Kicu commented Jan 8, 2025

Closing after discussing this with @gedu over slack. Everything works correctly when we use npm install at the root level instead of yarn

@Kicu Kicu closed this Jan 8, 2025
@Kicu
Copy link
Contributor Author

Kicu commented Jan 8, 2025

Superseded with this: #231 - just a README change needed ;)

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

Successfully merging this pull request may close these issues.

1 participant