-
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
framework-[contenthash].js includes react-dom-server when using gatsby-plugin-image #37281
Comments
Thanks @LekoArts ! |
@LekoArts this seems to not be working on the newest 5.6 release. I am seeing the app-[contenthash].js exploding in size. And the framework-[contenthash].js is not being created. |
Please provide a reproduction, I haven't seen this in my local testing when authoring the PR |
@LekoArts I narrowed down the issue. It seems to only come up when using pnpm (with the gatsby-plugin-pnpm). Most likely related to the code here: |
The split chunking won't happen in |
@LekoArts I am seeing this with |
I was referring to the plugin's comment:
But yeah, I'm afraid if this is caused through this plugin you'll need to send in a PR fixing it |
@LekoArts Yeah, but it's really a shame that gatsby doesn't just support pnpm out of the box. There are lots of issues related to pnpm in this repository, it might be worth considering adding pnpm support here if people are using it? |
Preliminary Checks
Description
When using
GatsbyImage
fromgatsby-plugin-image
, theframework-[contenthash].js
is getting bloated by includingreact-dom/server
:This comes from a change at #35226 from @wardpeet by using
renderToStaticMarkup
fromreact-dom/server
:https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-image/src/components/lazy-hydrate.tsx#L202
Reproduction Link
https://github.com/danilobuerger/gatsby-repro
Steps to Reproduce
framework-[contenthash].js
size (ca 46.2 kb)GatsbyImage
insrc/pages/index.tsx
framework-[contenthash].js
size (ca 67.4 kb)The size between step 2 and 4 will be different
Expected Result
framework-[contenthash].js
should not includereact-dom/server
.Actual Result
framework-[contenthash].js
includesreact-dom/server
.Environment
The text was updated successfully, but these errors were encountered: