@E18e/Error Cause

1.0.5Last update Aug 9, 2024
by@e18e

Error Cause Codemod

Introduction

This codemod removes the import of the error-cause/auto package from the codebase. By eliminating this unnecessary dependency, it helps reduce bundle size and improve the performance of the application.

Before

import { createError } from 'error-cause/auto';
const error = createError('An error occurred');

After

const error = new Error('An error occurred');

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now