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

Javascript not being executed after build of app created with create-react-app 2.0.4 #266

Closed
GeordieP opened this issue Oct 4, 2018 · 4 comments

Comments

@GeordieP
Copy link

GeordieP commented Oct 4, 2018

I believe I'm experiencing an issue similar to #251. Using the latest version of create-react-app and react-snap, none of the JS on the page seems to work.

Versions:
react: 16.5.2
react-scripts: 2.0.4
react-snap: 1.19.0

No custom options provided to react-snap or CRA; both running straight out of the box.

Reproduction repository here; React app with simple JS actions:
https://gitlab.com/GeordieP/snap-issue-cra

Similarly to #251, the JS appears to be bundled and chunked correctly, and is referenced in a script tag in the page. Tested on both Ubuntu 18.04 and macOS 10.14.

In addition, I've got the same app built with Parcel (v1.10.1) instead of CRA & webpack, and everything seems to work correctly:
https://gitlab.com/GeordieP/snap-issue-parcel/

I'd go ahead and use Parcel, but I run into a different problem when introducing async components:
https://gitlab.com/GeordieP/snap-issue-parcel-codesplit
... but that's for a separate issue. 😉

@crunchtime-ali
Copy link

crunchtime-ali commented Oct 5, 2018

I am experiencing the same issue since upgrading to CRA 2.x. I am also on the latest react-snap version 0.19.0

@stereobooster
Copy link
Owner

For now I will gather all CRA2 issues in this ticket #264

@sanvyx
Copy link

sanvyx commented Oct 11, 2018

Same issue.
"react-scripts": "2.0.4"
"react-snap": "1.19.0"

@sanvyx
Copy link

sanvyx commented Oct 11, 2018

Solution
#264

It has some drawbacks, but it worked for me.

Repository owner locked and limited conversation to collaborators Oct 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants