Last active
August 11, 2023 14:31
-
-
Save breakerh/613062a8e3d50a994db26d984e1089d4 to your computer and use it in GitHub Desktop.
nextjs config file to prevent the client side from loading slow when using mui
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @type {import('next').NextConfig} */ | |
const nextConfig = { | |
/*experimental: { | |
appDir: true, | |
},*/ | |
modularizeImports: { | |
'@mui/material': { | |
transform: '@mui/material/{{member}}' | |
}, | |
'@mui/lab': { | |
transform: '@mui/lab/{{member}}' | |
}, | |
'@mui/icons-material/?(((\w)?/?)*)': { | |
transform: '@mui/icons-material/{{ matches.[1] }}/{{member}}' | |
} | |
} | |
} | |
module.exports = nextConfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment