diff --git a/packages/remix-dev/compiler/compileBrowser.ts b/packages/remix-dev/compiler/compileBrowser.ts index b09a2abddcd..8692c7e089a 100644 --- a/packages/remix-dev/compiler/compileBrowser.ts +++ b/packages/remix-dev/compiler/compileBrowser.ts @@ -82,6 +82,8 @@ const isCssBundlingEnabled = (config: RemixConfig): boolean => ); let cssBundleHrefChannel: Channel; + +// This function gives esbuild access to the latest channel value on rebuilds let getCssBundleHref = () => cssBundleHrefChannel.read(); const createEsbuildConfig = ( diff --git a/packages/remix-dev/compiler/plugins/cssBundleUpdatePlugin.ts b/packages/remix-dev/compiler/plugins/cssBundleUpdatePlugin.ts index 29d444a3f30..6fc9298f6d9 100644 --- a/packages/remix-dev/compiler/plugins/cssBundleUpdatePlugin.ts +++ b/packages/remix-dev/compiler/plugins/cssBundleUpdatePlugin.ts @@ -16,7 +16,7 @@ export function cssBundleUpdatePlugin({ getCssBundleHref: () => Promise; }): Plugin { return { - name: "css-bundle-update-plugin", + name: pluginName, async setup(build) { let isRebuild = false; build.onEnd(() => {