#The Next.js project has a total size exceeding 5 GB,

2 messages · Page 1 of 1 (latest)

clear veldt
#

const nextConfig = {
output: 'standalone',
experimental: {
// Improve performance on dev,
// @see: https://nextjs.org/docs/app/api-reference/next-config-js/optimizePackageImports
optimizePackageImports: ['lucide-react', 'react-icons/*', 'recharts'],
},
optimizeFonts: true,
reactStrictMode: false,
distDir: isElectron ? '.nextron' : '.next',
transpilePackages: ['@saas-ui/date-picker'],
output: 'standalone',
with the node_modules directory have 1 gb max size how other static file exceed that much
webpack: (config, options) => {
const { isServer } = options
if (!isServer && isElectron) {
config.target = 'electron-renderer'
}

// Load pro packages from src instead of dist
config.plugins = config.plugins.concat([SaasUIProPlugin()])

config.resolve.extensionAlias = {
  '.js': ['.js', '.ts', 'tsx'],
  '.jsx': ['.jsx', '.tsx'],
}

return config

},
}

API Reference for optimizePackageImports Next.js Config Option

visual heathBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)