/remix-esbuild-analysis

Includes patch to add --metafile and bundle anaysis support to Remix compiler

MIT LicenseMIT

Remix esbuild bundle analysis patch

This patch will add the --metafile option to the esbuild compiler. It generates a meta.json file in the output directory for both client and server builds. You can upload the meta.json file to Bundle Buddy or esbuild Bundle Size Analyzer.

It also generates the bundle-analsys.txt file which shows how modules were bundled and the size contributed to the final file.

🛠 Installation

npm install -D patch-package

Copy one of the patch files from the patches folder to your project patches folder. Choose the correct Remix version for your patch.

Apply the patch

npx patch-package

Update your package.json file to include the following postinstall script. This will ensure your patch is automatically applied when you checkout you project.

"scripts": {
  "postinstall": "patch-package"
}