-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Final 4.0 release #1903
Comments
Hi @gauravtiwari Here's my package.json file
And here's a screenshot of the error And my entry file looks like this:
Take note, it also didn't work when I removed I also ran this command to add latest code from new release What could be the src of this problem? |
Hi, could you look #1887 ? |
Hi, @jasl seems that's not the problem. I had to return it back to how it was, except the Then everything seems to be working after that, at least it compiled successfully. But my screen remains blank after that. Not sure if this is a problem with webpacker though. Going to try to debug further. |
I think a simple upgrade path would be:
|
@gauravtiwari good evening, pls check my comment above. |
I can reproduce on new app (Rails 6 alpha + Webpacker 4 RC3) twice, now I do a quick check again, if problem still here, I'll given a public repo |
@jasl check there's a RC5 already 😀 |
@mayordwells Sorry, |
@mayordwells @gauravtiwari reproduced on Rails 6 beta + Webpacker 4 RC5 I push a PoC at https://github.com/jasl/test_webpacker4 |
@gauravtiwari okay after few hours of debugging, I found out that the gem is the cause of the blank screen - I have reverted back to rc.2 in the mean time. |
Hmm, that's strange. Are you using split chunks? How are you using pack tag helpers? |
@gauravtiwari To be honest, I don't fully understand the meaning of split chunks, but I have it in webpack/environment.js like so This is how I'm using pack tag helpers -
|
You would need to use new chunks helper if you are enabling split chunks. Otherwise, you can disable |
@gauravtiwari so you are right after removing We are currently using React Suspense and Lazy for lazy loading pages on the frontend. Here's an example of our webpack log during compilation. BTW this is generated without Could this be the reason for the error "duplicated mapping key"? |
That seems like some issue in |
@gauravtiwari Same error, split chunks activated with Check this gist to see my webpacker.yml https://gist.github.com/mayordwells/4c3ddb05290b68bfe69dcc7a60ea5631 |
@mayordwells Is there a pack called map |
@gauravtiwari oh wow you were right, its from the webpacker.yml file my staging config was like this
fixed it to be like this
|
When this error happens? |
Great 👍 http://www.yamllint.com/ (good linter) |
Thanks. |
Did you run the |
Should contain all react specific packages? https://github.com/rails/webpacker/blob/master/lib/install/examples/react/babel.config.js |
Ahh, yes, it's an old babel config, which has a typo we fixed later. Yes, because you are including map in the chunks_tag, please remove (guess you copied from the changelog). That helper tag takes an array, but in your case since it's just one pack - application. |
|
Okay going to try this now. Thanks. |
Same for stylesheets tag too. |
@connorshea The change was made for #1887 to enable webpacker to pack user avatars via JavaScript. IMHO, this is not a valid reason to break deploys for all Heroku users. The fix didn't even seem to help the original user who made the issue, and has since caused more issues than it fixed: #1938 (comment) #1845 (comment) #1915 #1947 #1922 (comment). Beyond that, why would you want your client-side JS to handle all of your image loading? Just toss your image in
3 months ago, Webpack@5 had their first alpha release. There seems to be a bunch of breaking structural changes. I really think that webpackER needs to focus more on core use-cases (i.e. webpacking JS) and not trying to fill the entirety of Sprokets' shoes. Edit: As I said on the mailing list, filling Sprokets' shoes is not a bad thing, it is just a very large scope with many user-specific caveats. |
@jakeNiemiec having read through the issues linked I can't say I fully understand the issue or why the given change was chosen as the solution, so I could be wrong, but from my current understand of the situation I do agree now that that's an issue that needs to be fixed before 4.0 final is released. Breaking deploys on Heroku isn't an acceptable trade-off. Given that, what would the ideal solution be? Just revert the change entirely? |
I've opened #1950 that reverts the pull request. I'm not sure if it's a complete fix but it seems a necessary start. |
@connorshea ~~My understanding is that it comes down to 2 restrictions: ~~ Line 7 in 771e3b1
Line 19 in 771e3b1
This section has since been addressed. As @joelmoss points out, "the default Webpack config that Webpacker produces is now ways away from what I need in my projects.". These changes & the 4.0 delay make a good case to just use vanilla webpack. Need a weird config for your CDN? The base API has whatever you need covered without requiring you to peel back or translate layers of API abstraction. But how hard is it to use webpack without webpackER?
Caveats:
If this does not sound appealing or if webpacker is working well for you, I wouldn't recommend following this. But if you are having problems and want to experience life without webpackER abstractions, consider this a Edit: I found a note on how to solve part of the problem, but it does not address the file overwriting from #1887 (comment) |
However, I am still pursuing my path of a lighter and [almost] webpack only solution, with only the required integration with Rails. If all goes well, I will of course open source it. |
Looking forward to using babel 7 because prominent projects like jest no longer support babel 6, not even for security issues. Thanks to everyone working on this release. ❤️ |
@joelmoss – this sounds like music to my ears! I'm looking forward to it, please let us know if we can help, at least I would. |
Anyone have opinions on this? #1946 Pretty much a 4.0 blocker for anyone using |
At www.rankia.com we use |
@maschwenk @javan Thank you! |
Hello everyone, I was away on holiday. I will look into pending PRs now and see if we can make a release. Apologies for the delay. |
Please try out latest RC. |
If everything looks good then I am happy to make a stable release today? |
My test suite is passing on rc8 and everything looks good after a quick check. Not a comprehensive check, but it looks good to me :) |
We are also running |
👍 my |
Stable 4.0 released |
Time to update the |
To update a Webpacker v3.5 app to v4, see v4-upgrade.md. If you're using React, look for "Package-Specific Notes". |
Sorry, it took a while and thanks for the support.
Could everyone please give the latest RC a try and see if everything works as needed? If no major issues found, I will go ahead a make a 4.0 stable release today.
Thank you 🙏
The text was updated successfully, but these errors were encountered: