-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Fix hot reloading by making auto-generated route components es6 classes instead of functional components #531
Closed
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
* Rename .gatsby-intermediate-build to .intermediate-build — gatsby was redundant * Add site as an object in the globals module + try out observables. * Add api-runner which is the start of our new API/Plugin system.
This is either code made useless by new data + routes sytems or Webpack config we no longer support out-of-the box due to the coming plugin system. The removed Sass, Less, TOML, YAML, JSON, image compression support will be added back as plugins or now make more sense as GraphQL source plugins.
Less boilerplate ftw!
…e/chunk structure
Match the compiler metaphor we're following.
Can be source of bugs if old compiled file sticks around and old requires keep working.
Currently deploying new version of the site breaks with service workers as the extracted chunk manifest (loaded fresh everytime) doesn't match the chunk ids used in some of the cached chunks. At least that's my theory :-) In any case, I keep seeing this error: bootstrap 1a2fd54…:50 Uncaught TypeError: Cannot read property 'call' of undefined which disappears as soon as I update to the latest service worker or bypass the service worker. With the AppShell, everything will stay the same until the user updates to the new version of the service worker so there shouldn't be more trouble w/ mismatched module ids.
This is preparation for creating an API for sites and plugins to add arbitrary types to the schema.
I thought this was necessary for npm link development but perhaps not? I dunno... npm link is weird. Regardless, this breaks installing the 1.0 branch normally as then `node_modules/gatsby/node_modules` doesn't exist which causes the webpack validation to fail.
React-hot-loader v3 requires all sub components to be required in a different file.
React-Router route components can't be functional components for hot reloading to work consistently with react-hot-loader-beta6... weird.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Turns out React-Router route components can't be functional components for hot reloading to work consistently with react-hot-loader-beta6... weird.