A

webpack/v5/migrate-library-target-to-library-object

How to Use
Run this codemod on your codebase using one of the following commands

The easiest way to run this codemod without installing anything globally:

Documentation

This codemod migrates the output.library and output.libraryTarget properties in Webpack configurations to the new format required by Webpack 5. It changes output.library to output.library.name and output.libraryTarget to output.library.type.

Example

Before

ts

After

ts

,

Before

ts

After

ts

,

Before

ts

After

ts

,

Before

ts

After

ts

Ready to contribute?

Build your own codemod and share it with the community.