File tree Expand file tree Collapse file tree 3 files changed +103
-77
lines changed Expand file tree Collapse file tree 3 files changed +103
-77
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,7 @@ const nextConfig = {
1313 reactCompiler : true ,
1414 } ,
1515 env : { } ,
16- serverExternalPackages : [
17- '@babel/core' ,
18- '@babel/plugin-transform-modules-commonjs' ,
19- ] ,
16+ serverExternalPackages : [ ] ,
2017 webpack : ( config , { dev, isServer, ...options } ) => {
2118 if ( process . env . ANALYZE ) {
2219 const { BundleAnalyzerPlugin} = require ( 'webpack-bundle-analyzer' ) ;
Original file line number Diff line number Diff line change @@ -150,13 +150,78 @@ function UwuScript() {
150150 ) ;
151151}
152152
153+ function FontPreload ( ) {
154+ return (
155+ < >
156+ < link
157+ rel = "preload"
158+ href = "/fonts/Source-Code-Pro-Regular.woff2"
159+ as = "font"
160+ type = "font/woff2"
161+ crossOrigin = "anonymous"
162+ />
163+ < link
164+ rel = "preload"
165+ href = "/fonts/Optimistic_Display_W_Md.woff2"
166+ as = "font"
167+ type = "font/woff2"
168+ crossOrigin = "anonymous"
169+ />
170+ < link
171+ rel = "preload"
172+ href = "/fonts/Optimistic_Display_W_SBd.woff2"
173+ as = "font"
174+ type = "font/woff2"
175+ crossOrigin = "anonymous"
176+ />
177+ < link
178+ rel = "preload"
179+ href = "/fonts/Optimistic_Display_W_Bd.woff2"
180+ as = "font"
181+ type = "font/woff2"
182+ crossOrigin = "anonymous"
183+ />
184+ < link
185+ rel = "preload"
186+ href = "/fonts/Optimistic_Text_W_Md.woff2"
187+ as = "font"
188+ type = "font/woff2"
189+ crossOrigin = "anonymous"
190+ />
191+ < link
192+ rel = "preload"
193+ href = "/fonts/Optimistic_Text_W_Bd.woff2"
194+ as = "font"
195+ type = "font/woff2"
196+ crossOrigin = "anonymous"
197+ />
198+ < link
199+ rel = "preload"
200+ href = "/fonts/Optimistic_Text_W_Rg.woff2"
201+ as = "font"
202+ type = "font/woff2"
203+ crossOrigin = "anonymous"
204+ />
205+ < link
206+ rel = "preload"
207+ href = "/fonts/Optimistic_Text_W_It.woff2"
208+ as = "font"
209+ type = "font/woff2"
210+ crossOrigin = "anonymous"
211+ />
212+ </ >
213+ ) ;
214+ }
215+
153216export default function RootLayout ( { children} : { children : React . ReactNode } ) {
154217 return (
155218 < html
156219 lang = { siteConfig . languageCode }
157220 dir = { siteConfig . isRTL ? 'rtl' : 'ltr' }
158221 suppressHydrationWarning >
159- < head />
222+ < head >
223+ < FontPreload />
224+ </ head >
160225 < body className = "font-text font-medium antialiased text-lg bg-wash dark:bg-wash-dark text-secondary dark:text-secondary-dark leading-base" >
161226 < ScrollHandler />
162227 < ThemeScript />
You can’t perform that action at this time.
0 commit comments