This repository has been archived by the owner on Apr 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Upgrade to Create React App 2.0 #72
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Storybook doesn't work but `yarn start` seems to.
Moved things to dev-dependencies and made scripts nicer. Things in devDepndencies are things which aren't used by the application at runtime.
Don't need it with create-react-app and cosmos.
Not targeting mobile. Don't really have an icon.
Why? Because it forces me to develop with loading states in mind.
This isn't great testing but it is free testing.
I think sticking to storybook is better. Cosmos doesn't use react components for depndencies. Migrating is hard.
It seems to work with Create React App 2. Flawlessly even.
Just run it locally.
0xcaff
changed the title
[WIP] Upgrade to Create React App 2.0
Upgrade to Create React App 2.0
Dec 19, 2018
The benefits of the mock resolver in the proxy outweigh the benefits of the demo thing. Developer experience is more important than what people think. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Did some housekeeping to make contributing to this project fun again.
Migrated to Create React App 2.0
We were previously using an ejected version of create-react-app 1.0 with a few modifications (typescript support, css modules, and a couple other things). Now all of these things can be done with CRA2.
Migrated to Storybook 4.0
It works out of the box with create-react-app 2.0. The only issue is that it creates a bazillion warnings when installing dependencies. All dependencies are handled by create-react-app and this is a non-issue.
Moved Mock Resolver to Proxy
The mock resolver is no longer in the application bundle. Now, it is added to the dev proxy using
src/setupProxy.js
andapollo-server-express
. This allows for accessing the graphql playground, probably reduces bundle size and allows for throttling response time with tools in network devtools but breaks the demo site. Need to think about whether this is a good idea. Will be helpful for Loading States Missing Everywhere #68 .Added Formatting on Precommit Hook
It is really easy to commit unformatted code. This makes it easier to not forget.
yarn fmt
is run before every commit with husky.These changes have shaved about 80kb off the bundle size.
Closes #70
Closes #71