Change a module specifier

Proprietary

Rewrites the module of import, export ... from and require with a regular expression that must match the whole module name. Names in the replacement can refer to groups, as $1.

org.openrewrite.react.mui.change-module-specifier

Required

A regular expression that matches the whole module name.

The replacement, which can use $1 and so on.

mod run . --recipe=org.openrewrite.react.mui.change-module-specifier \ -P oldPattern='@material-ui/core/(.*)' \ -P newModule='@mui/material/$1'

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.