Change import and usage of from css-minimizer-webpack-plugin to use included rspack.LightningCssMinimizerRspackPlugin.
Before
//change the import statement to const rspack = require('@rspack/core');//track where this CssMinimizerPlugin variable is usedconst CssMinimizerPlugin = require('css-minimizer-webpack-plugin');module.exports = {optimization: {//change CssMinimizerPlugin to rspack.LightningCssMinimizerRspackPluginminimizer: [new CssMinimizerPlugin()],},};
After
const rspack = require('@rspack/core');module.exports = {// ...optimization: {minimizer: [new rspack.LightningCssMinimizerRspackPlugin(options)],},};
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community