You can do the following things to speedup dev environment of Next.js 13+ development server.
Add the following item in next.config.js
file.
module.exports = {
fastRefresh: true,
};
You can add the following if above thing did not work in next.config.js
.
module.exports = {
concurrentFeatures: true,
};
Optimize the build configuration: Ensure that your build configuration is optimized for development. For example, you can disable certain optimizations like minification and source-maps to improve build speed during development. Review your next.config.js
file and make appropriate adjustments.
Example is here in next.config.js
:
module.exports = {
productionBrowserSourceMaps: false, // Disable source maps in development
optimizeFonts: false, // Disable font optimization
minify: false, // Disable minification
};