← All recipes
Moderne licensed

Convert export = to export default

Recipe IDorg.openrewrite.javascript.migrate.typescript.export-assignment-to-export-defaultArtifact@openrewrite/rewrite

Converts TypeScript export = syntax to ES module export default syntax for compatibility with ECMAScript modules.

Single recipeMSAL

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.javascript.migrate.typescript.export-assignment-to-export-default

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/rewrite