-
Notifications
You must be signed in to change notification settings - Fork 1.3k
PERF(gatsby): optimize webpack and MDX loading #6449 #6455
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
Conversation
|
I will definitely fix these 3 issues by today for sure @leecalcote |
666bc58
to
0296548
Compare
src/components/LazyDialog/index.js
Outdated
const DialogContent = lazy(() => import("@mui/material/DialogContent")); | ||
const DialogTitle = lazy(() => import("@mui/material/DialogTitle")); | ||
|
||
export const LazyModal = (props) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am assuming we could have some shared Loader or Skeleton component, so it might be worth creating a small HOC to take care of the Suspense with Skeleton/Loader fallback for better UI and UX, also having ErrorBoundary would be great
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for suggesting.
@Sukuna0007Abhi Add it as an agenda item to the meeting minutes, if you would :) |
Sure sir, thanks for the guidance. @vishalvivekm |
src/theme/app.js
Outdated
import { createTheme } from "@mui/material/styles"; | ||
|
||
// Create a theme instance | ||
const theme = createTheme({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sukuna0007Abhi isn't we already have defined somewhere the global css, why creating a another file for defining theme
gatsby-node.js
Outdated
@@ -275,6 +275,12 @@ exports.createPages = async ({ actions, graphql, reporter }) => { | |||
redirectInBrowser: true, | |||
isPermanent: true, | |||
}); | |||
createRedirect({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why a single blog needed a redirect. This seems a redundant change. We should avoid this and instead changed the path where this blog is been mentioned if its being used in less places.
package.json
Outdated
@@ -10,14 +10,14 @@ | |||
"url": "https://layer5.io" | |||
}, | |||
"scripts": { | |||
"build": "gatsby build", | |||
"build": "npx gatsby build", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why npx?
package.json
Outdated
@@ -64,7 +65,7 @@ | |||
"gatsby-plugin-image": "^3.11.0", | |||
"gatsby-plugin-loadable-components-ssr": "^4.3.2", | |||
"gatsby-plugin-manifest": "^5.11.0", | |||
"gatsby-plugin-mdx": "3.20.0", | |||
"gatsby-plugin-mdx": "^5.12.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you are upgrading this then mdx/react also need to be upgraded to v2...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok sir got it
fb769af
to
a7ebf09
Compare
# Performance Optimization for Layer5 Website
##Issue no. #6449
## Changes Made
1. Added Webpack Bundle Analysis & Optimization:
2. Added Performance-Focused Gatsby Flags:
3. Enhanced MDX & Image Configuration:
##Technical Benefits
##Performance Improvements
##Implementation Details
<<Configured webpack chunk sizes (30KB-250KB).
<<Set up vendor bundle splitting.
<<Implemented lazy loading for images.
<<Added modern image format support.
<<Enabled development mode awareness.
<<Configured cache persistence.
<<Optimized build process.
<<Enhanced MDX processing.
##Testing
##Files Changed
[gatsby-config.js]
##Notes
Signed-off-by: [Abhijit](Ryomen Sukuna) [appsonly310@gmail.com]