Skip to content

Commit

Permalink
feat(optimization): Page loading speed optimization (#6)
Browse files Browse the repository at this point in the history
* feat(optimize): prevent layout reshifts while loading fonts

* feat(optimzie): prevent scroll overflow on embeded frame loading

* feat(optimize): image size optimization on static export

feat: codestyle fix

fix: code style

---------

Co-authored-by: Evgeniy Geraskin <evgeniygeraskin@Evgeniys-MacBook-Pro.local>
  • Loading branch information
Krakazybik and Evgeniy Geraskin authored Aug 20, 2024
1 parent b1b90a7 commit 621502f
Show file tree
Hide file tree
Showing 13 changed files with 491 additions and 45 deletions.
16 changes: 14 additions & 2 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@
const nextConfig = {
output: 'export',
images: {
unoptimized: true
loader: 'custom',
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
deviceSizes: [320, 640, 750, 828, 1080, 1200, 1920, 2048, 3840],
},
transpilePackages: ['next-image-export-optimizer'],
env: {
nextImageExportOptimizer_imageFolderPath: 'public/images',
nextImageExportOptimizer_exportFolderPath: 'out',
nextImageExportOptimizer_quality: '75',
nextImageExportOptimizer_storePicturesInWEBP: 'true',
nextImageExportOptimizer_exportFolderName: 'nextImageExportOptimizer',
nextImageExportOptimizer_generateAndUseBlurImages: 'true',
nextImageExportOptimizer_remoteImageCacheTTL: '0',
},
webpack: (config, { isServer }) => {
if (!isServer) {
Expand All @@ -23,4 +35,4 @@ const nextConfig = {
}
};

export default nextConfig;
export default nextConfig;
Loading

0 comments on commit 621502f

Please sign in to comment.