penta-plugins-upgrader
v1.1.11
Published
A CLI tool to upgrade plugins to Webpack 5, update dependencies, and optimize the build configuration.
Maintainers
Readme
Upgrade React Webpack 5 CLI A command-line tool designed to automate the process of upgrading React projects to use Webpack 5. This tool handles package updates, configuration changes, build optimizations, and ensures your project's dependencies and externals are set up correctly for a modern development environment.
Overview This CLI tool provides a set of commands to help you:
Automatically upgrade Webpack 4 dependencies to Webpack 5.
Update your Webpack configuration to match the Webpack 5 schema.
Move react, react-dom, redux, and react-redux to devDependencies and update them to be compatible with React 18.
Configure Webpack externals for a plugin/micro-frontend architecture.
Add build optimizations to remove console logs and comments from production builds.
Handle multiple scripts through a simple command-line interface.
Installation & Usage There is no installation step required. You can run this tool directly on your project using npx.
Make sure you are in the root directory of the React project you want to upgrade, then run:
npx upgrade-react-webpack5
Commands This tool uses a command-based interface. You must specify which command you want to run.
upgrade This is the main command. It runs the entire upgrade and configuration process on your project.
Usage:
npx upgrade-react-webpack5 upgrade
When you run this command, the script will:
Prompt you to confirm your Webpack configuration file name.
Analyze and update your package.json.
Analyze and update your Webpack configuration file.
lint (Example of a future command) This command could be used to check your project for common configuration issues.
Usage:
npx upgrade-react-webpack5 lint
Development (Running from GitHub) If you want to test changes directly from a GitHub repository without publishing to npm, you can use npx with a GitHub URL.
Replace YOUR_USERNAME and YOUR_REPO_NAME with your actual GitHub details
npx github:YOUR_USERNAME/YOUR_REPO_NAME upgrade
License This project is licensed under the MIT License.
