Skip to content

Commit

Permalink
Merge branch 'dev' into markdalgleish/cache-css-side-effects-hmr
Browse files Browse the repository at this point in the history
  • Loading branch information
markdalgleish authored Jun 19, 2023
2 parents ac2d30a + 43ec6af commit 6447f90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/css-bundle-skip-node-polyfills.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": patch
---

Improve CSS bundle build performance by skipping unused Node polyfills
2 changes: 0 additions & 2 deletions packages/remix-dev/compiler/css/compiler.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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: {
Expand Down

0 comments on commit 6447f90

Please sign in to comment.