Next.js Discord

Discord Forum

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

Unanswered
Giant Chinchilla posted this in #help-forum
Open in Discord
Avatar
Giant ChinchillaOP
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
},
}

1 Reply

Avatar
Giant ChinchillaOP
Any solution for this