Skip to content

Update Libs #6

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

Closed
stevensacks opened this issue Sep 17, 2018 · 16 comments
Closed

Update Libs #6

stevensacks opened this issue Sep 17, 2018 · 16 comments
Labels
Next Version This issue will be worked on in the next release

Comments

@stevensacks
Copy link

A great many of the libs in this project are behind. I was able to update almost all of them except just a few. Working through the issues, here's what I discovered.

WebPack 4 is the biggest change since it no longer requires as much configuration. However, I don't know enough about your particular setup to know what can/should be removed from your configs so I left them alone except for two things that were required to make it run.

In the config files for dev and prod, you have to move InterpolateHtmlPlugin after HtmlWebpackPlugin ( as per jantimon/html-webpack-plugin#875 ).

You also have to add mode: 'development' to dev and mode: 'production'` to prod ( as per https://webpack.js.org/concepts/mode/ )

This version of react-dev-utils is required until the Webpack 4 upgrade PR gets merged in:
facebook/create-react-app#4466 (comment)

React can't be updated to 16.5.x until this PR is merged and released:
necolas/react-native-web#1096

React Native 0.56.0 works, but 0.57.0 won't without React 16.5 and these changes: https://github.com/react-native-community/react-native-releases/blob/master/CHANGELOG.md#updating-to-this-version

@orYoffe
Copy link
Owner

orYoffe commented Oct 1, 2018

Hi @stevensacks, thanks a lot for the detailed issue.
I would be happy to but I would wait for create-react-app to upgrade to babel 7 and webpack 4 (they're working on v2) and then i will recreate it from that project.
PRs are welcome :)

@orYoffe orYoffe closed this as completed Oct 1, 2018
@stevensacks
Copy link
Author

Hello again! CRA 2 is out! Can we get this working this week?

@stevensacks
Copy link
Author

I tried updating the libs but when I run the build I get an error

No bundle URL found

@orYoffe
Copy link
Owner

orYoffe commented Oct 8, 2018

Hi @stevensacks,
thanks for the update. Unfortunately I can not promise I will finish it this week. I am sorry but I have other work to do at the moment. Not entirely sure when i will be able to do the next release but I will do my best to do it asap.
Many thanks for the interest.

Babel and Webpack aren't the most problematic to update since I didn't see react-native-web working yet with the most updated react-native and reactjs versions so it might take some time..

If you are trying to create a new project and fear that it won't be compatible with the next release don't worry since you could just copy your components and continue once I finished the next release since i don't see many breaking changes.

@orYoffe orYoffe reopened this Oct 8, 2018
@orYoffe orYoffe added the Next Version This issue will be worked on in the next release label Oct 8, 2018
@stevensacks
Copy link
Author

It’s more that I want to use the recent version of React (16.5.x) than React Native 0.57.

@orYoffe
Copy link
Owner

orYoffe commented Oct 8, 2018

@stevensacks from what i read, it's possible with react 16.5.1 necolas/react-native-web#1096 (comment)
and react-native-web 9 necolas/react-native-web#1096 (comment)

@geminiyellow
Copy link

👏 hey @orYoffe , good work day day up.

@stevensacks
Copy link
Author

With Suspense and Hooks coming soon, it seems like now more than ever it's a good time to work through the issues in upgrading this library to the latest (stable) version of React so it's easy to update to the version with Hooks when it's released.

@orYoffe
Copy link
Owner

orYoffe commented Oct 30, 2018

@stevensacks I agree and love the new features too, unfortunately the issue is of time currently and not of will, maybe will be able to work on it this month.
but that doesn't promise that the newest version of react will be available since react-native doesn't always update automatically to the newest and the same for react-native-web.

thanks for your patience and I would suggest to try composing the project yourself since you seem motivated. It's a good learning experience and I would love to merge a working PR since I don't have that much time to work on it.

Also the new api from jest of snapshot directory resolver should solve the switchSnapshots.js script I run before each test

@stevensacks
Copy link
Author

I’ve tried to update the project with new libs but I keep running into issues where errors happen on build after I do. My guess is I’m not understanding some particulars of your webpack build configuration. The new version of Webpack doesn’t require as much configuration so that could be contributing, as well.

For the time being, I’m going to make a new React Native project and worry about the web version later since they have fixed the issues with the latest version of Xcode and hopefully you can find some time to update this lib in the meantime.

Thanks!

@geminiyellow
Copy link

yep, babel's update is good, but when i upgrade webpack configs, there is not too much diff, but run into error. dont know why.

@rpweb
Copy link

rpweb commented Nov 8, 2018

@orYoffe thanks for the good work! looking forward for the new version.
are you located in berlin? if yes, we could meet up. would like to contribute

@orYoffe
Copy link
Owner

orYoffe commented Nov 29, 2018

handled with the new release #11

@orYoffe orYoffe closed this as completed Nov 29, 2018
@geminiyellow
Copy link

@orYoffe hi, could you give a migration guild?

@stevensacks
Copy link
Author

stevensacks commented Dec 2, 2018

Hm. You only updated react version, but not react-native (important to work with XCode 10), and the following major/minor (patch less important):

 react-native             0.55.x  →  0.57.x
 @svgr/webpack             2.4.1  →   4.1.0
 babel-eslint              9.0.0  →  10.0.1
 dotenv                    6.0.0  →   6.1.0
 eslint                    5.6.0  →   5.9.0
 eslint-plugin-flowtype   2.50.1  →   3.2.0
 pnp-webpack-plugin        1.1.0  →   1.2.1
 postcss-preset-env        6.0.6  →   6.4.0
 webpack                  4.19.1  →  4.26.1

@orYoffe
Copy link
Owner

orYoffe commented Dec 3, 2018

@geminiyellow I would suggest to try to take your code and try to copy paste it into a new project and see what breaks :) I hope it works for you

@stevensacks I couldn't upgrade the react-native version as react-native-web supports v0.55 since v0.56 has too big of a difference for them to fix right away
https://github.com/necolas/react-native-web
About Xcode 10 take a look at this thread to solve and support legacy build in Xcode for ios
facebook/react-native#19573

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Next Version This issue will be worked on in the next release
Projects
None yet
Development

No branches or pull requests

4 participants