Codemod verified
Regularly tested and maintained by our engineers and codemod expert community.
Next.js
migration
byCodemod
Next/13/Remove Next Export
Last update
Jul 24, 2024
The next export
command is deprecated. This codemod dangerously removes all references to the command in *.md
, *.sh
, package.json
. It also adds a property output
with the value export
to the module.exports
object in next.config.js
files.
Example
Before (Shell files):
npm run next buildnpm run next export
After (Shell files):
npm run next build
Before (next.config.js
files):
module.exports = {distDir: 'out',};
After (next.config.js
files):
module.exports = {distDir: 'out',output: 'export',};
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community