diff --git a/.changeset/css-bundle-skip-node-polyfills.md b/.changeset/css-bundle-skip-node-polyfills.md new file mode 100644 index 00000000000..8e7ab433e61 --- /dev/null +++ b/.changeset/css-bundle-skip-node-polyfills.md @@ -0,0 +1,5 @@ +--- +"@remix-run/dev": patch +--- + +Improve CSS bundle build performance by skipping unused Node polyfills diff --git a/packages/remix-dev/compiler/css/compiler.ts b/packages/remix-dev/compiler/css/compiler.ts index b6e1407a40f..9517a3aa9e5 100644 --- a/packages/remix-dev/compiler/css/compiler.ts +++ b/packages/remix-dev/compiler/css/compiler.ts @@ -1,6 +1,5 @@ import { builtinModules as nodeBuiltins } from "module"; import * as esbuild from "esbuild"; -import { nodeModulesPolyfillPlugin } from "esbuild-plugins-node-modules-polyfill"; import type { RemixConfig } from "../../config"; import { getAppDependencies } from "../../dependencies"; @@ -81,7 +80,6 @@ const createEsbuildConfig = (ctx: Context): esbuild.BuildOptions => { externalPlugin(/^https?:\/\//, { sideEffects: false }), mdxPlugin(ctx), emptyModulesPlugin(ctx, /\.server(\.[jt]sx?)?$/), - nodeModulesPolyfillPlugin(), externalPlugin(/^node:.*/, { sideEffects: false }), ], supported: {