-
Notifications
You must be signed in to change notification settings - Fork 26
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
Upgrade react-scripts to latest version (2.1.3) #99
Conversation
@toolness I'm currently using node v8.9.1 on my dev machine :) |
@sraby Ok I think this is good to go! I kicked the tires on IE11, Edge, Chrome, Firefox, and iPhone Safari. |
Er, actually hold on a sec @sraby... @romeboards is investigating whether the current WoW supports IE9 and IE10. If it does, then I will have to add the react polyfill thing for it (and we will have to test those browsers going forward, which is hard even for me on Windows b/c I only have IE11 here, so I guess I will have to use BrowserStack). |
Ok, Dan says we're only supporting IE11 so I think this is indeed good to go. |
Looking at Rollbar errors for the latest front-end version made me realize that there were arrow functions in our JS bundles. Upon further inspection, I realized our `browserslist` specifies `not ie <= 11`, yet our `index.js` imports both `react-app-polyfill/ie11` and `babel-polyfill`. These contradictory lines were actually all introduced in the same PR, #99, which is very odd. I think the reason we might not have seen this strange behavior when writing that PR is because apparently [changing `browserslist` requires deleting `node_modules/.cache`][1]. So it's possible that during development, we never truly saw the results of our actions! (Needless to say, I spent a lot of time in confusion after making this PR's simple code change, until I discovered the root cause.) This means that even Netlify won't reflect changes to `browserslist` by default (it caches all of `node_modules` between builds), so I've modified its configuration to clear `node_modules/.cache` before building the site too. [1]: facebook/create-react-app#8197 (comment)
Note: This is a PR against #95, notmaster
! I will re-target it tomaster
once #95 is merged.This is an attempt to upgrade react-scripts to the latest version--partially just to stay up-to-date, but also because 2.1.0 and higher support Typescript out of the box, which could be useful in sharing code between this app and the tenants app, specifically for #53.
To do
require.ensure()
(also a breaking change in 2).import()
follows new semantics in 2 (not an issue, we don't use dynamic import)jsdom
in 2 but we don't have any tests in it yet).PropTypes
in weird ways (another breaking change in 2).