A third-party library that allows overriding esbuild configuration in the Remix compiler. Current stable version is 3.1.0 (May 2023). It patches esbuild at runtime to let developers modify plugins, loaders, and other esbuild options. Unlike Remix's intentional restriction on exposing compiler config, this library provides a workaround via a postinstall script and a `withEsbuildOverride` function in `remix.config.js`. Requires @remix-run/dev >=1.2.0. Ships TypeScript types. Known for potential instability in production; use with caution.
npm install remix-esbuild-overrideNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use withEsbuildOverride in remix.config.js to modify esbuild options per environment.
Upgrade to v3+ and update remix.config.js to use `withEsbuildOverride` instead of previous API.
Verify no conflicts with other build tools; consider pinning esbuild version.
Use the `isServer` and `isDev` parameters to conditionally apply overrides.
Test extensively in staging before deploying to production.
Migrate to v3 by using `withEsbuildOverride` and ensuring postinstall script runs.
Run `npm install -D remix-esbuild-override` and ensure `"postinstall": "remix-esbuild-override"` is in package.json scripts, then run `npm install` again.
Use `const { withEsbuildOverride } = require('remix-esbuild-override');`Delete node_modules, reinstall dependencies, and ensure you have write permissions.
Use dynamic import or rename remix.config.js to .cjs extension to force CommonJS.