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

Fix code splitting issue #7943

Merged
merged 4 commits into from Oct 5, 2022
Merged

Fix code splitting issue #7943

merged 4 commits into from Oct 5, 2022

Conversation

pettinarip
Copy link
Member

With the inclusion of a custom .babelrc (on v4) code splitting stopped working correctly. This is due to a Gatsby bug.

Description

In order to fix it, we have deleted the custom .babelrc (since there seems to be no way of ignoring it from Gatsby) and we have created a custom webpack config file to be used by netlify-lambda.

@github-actions github-actions bot added the dependencies 📦 Changes related to project dependencies label Sep 20, 2022
@gatsby-cloud
Copy link

gatsby-cloud bot commented Sep 20, 2022

✅ ethereum-org-website-dev deploy preview ready

Copy link
Member Author

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

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

[FIXED]

We have a regression with Chakra styles. The buttons lost the styles
image

@pettinarip pettinarip changed the title Fix code splitting issue [WIP] Fix code splitting issue Sep 22, 2022
@pettinarip pettinarip marked this pull request as draft September 22, 2022 19:36
@github-actions github-actions bot added the needs review 👀 Review is needed for this issue or pull request label Sep 23, 2022
Button,
Link,
Tag,
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This took me a very long time to detect 😆 hate these kind of issues.

Once I removed the .babelrc for some reason these exports stop working as I was expecting. I had to export these in a more manual way, with the expected structure.

@pettinarip pettinarip changed the title [WIP] Fix code splitting issue Fix code splitting issue Sep 23, 2022
@pettinarip pettinarip marked this pull request as ready for review September 23, 2022 13:17
Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

Looks good... As discussed, we can research further potentially using @netlify/functions with TypeScript support and remove usage of netlify-lambda going forward

@corwintines corwintines merged commit b89c1b8 into dev Oct 5, 2022
@corwintines corwintines deleted the fix-code-splitting branch October 5, 2022 19:29
@corwintines corwintines mentioned this pull request Oct 6, 2022
@dawsbot
Copy link

dawsbot commented Oct 24, 2022

Is there any perf monitoring on the repo to determine how much this change improved the bundle size?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies 📦 Changes related to project dependencies needs review 👀 Review is needed for this issue or pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants