Skip to content
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

feat(gatsby): split page-renderer per route #33054

Merged
merged 19 commits into from
Sep 15, 2021
Merged

Conversation

wardpeet
Copy link
Contributor

@wardpeet wardpeet commented Sep 4, 2021

Description

Enables multiple chunks in page-renderer

  • Remove dynamic imports babel-plugin to keep import() around
  • move page-renderer to .cache/routes
  • Disable DEV_SSR for a couple of weeks on the v4 channel

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Sep 4, 2021
@wardpeet wardpeet added topic: webpack/babel Webpack or babel type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Sep 4, 2021
@wardpeet wardpeet marked this pull request as draft September 6, 2021 07:37
@wardpeet wardpeet force-pushed the feat/page-renderer-split branch 3 times, most recently from 1cc4d4a to b500f84 Compare September 6, 2021 09:15
Base automatically changed from fix/reduce-page-renderer to master September 6, 2021 09:17
@wardpeet wardpeet force-pushed the feat/page-renderer-split branch from b500f84 to cd36446 Compare September 6, 2021 09:25
@wardpeet wardpeet changed the title fix(gatsby): reduce page-renderer-size feat(gatsby): split page-renderer per route Sep 6, 2021
@wardpeet wardpeet marked this pull request as ready for review September 6, 2021 18:12
@wardpeet wardpeet force-pushed the feat/page-renderer-split branch 2 times, most recently from b3ef06f to 6df3706 Compare September 12, 2021 12:30
@wardpeet wardpeet marked this pull request as draft September 13, 2021 08:13
@wardpeet wardpeet force-pushed the feat/page-renderer-split branch 2 times, most recently from 230df2f to e0f1559 Compare September 13, 2021 09:56
@wardpeet wardpeet marked this pull request as ready for review September 13, 2021 09:56
@@ -102,6 +102,11 @@ const activeFlags: Array<IFlag> = [
description: `Server Side Render (SSR) pages on full reloads during develop. Helps you detect SSR bugs and fix them without needing to do full builds. See umbrella issue for how to update custom webpack config.`,
umbrellaIssue: `https://gatsby.dev/dev-ssr-feedback`,
testFitness: (): fitnessEnum => {
// TODO Re-enable after gatsybcamp
if (_CFLAGS_.GATSBY_MAJOR === `4`) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DEV_SSR needs some work and didn't want to look at it now.

@wardpeet wardpeet force-pushed the feat/page-renderer-split branch from e0f1559 to 0cdad1a Compare September 14, 2021 15:47
docs/docs/html-generation.md Outdated Show resolved Hide resolved
Copy link
Contributor Author

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP IT! 🚢

@wardpeet wardpeet merged commit 8b32cb9 into master Sep 15, 2021
@wardpeet wardpeet deleted the feat/page-renderer-split branch September 15, 2021 11:37
@simonjoom
Copy link

Hello
I e got couple of question regarding this feat;

I would like to understand the interest to split page-renderer by route?
Can this mod reduce webpack code size in production mode?

in webpack-config I see you use
library: { type: commonjs, },
instead of libraryTarget: commonjs,
is that important?

note: I do use only SSG mode

Thanks for your support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: webpack/babel Webpack or babel type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants