From 49e8da1d686f18dbd7d41443e555eade04185eb8 Mon Sep 17 00:00:00 2001 From: Mark Dalgleish Date: Wed, 23 Aug 2023 09:42:01 +1000 Subject: [PATCH] fix(dev): remove unused css-bundle path resolution (#7233) --- .../compiler/plugins/cssBundlePlugin.ts | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/packages/remix-dev/compiler/plugins/cssBundlePlugin.ts b/packages/remix-dev/compiler/plugins/cssBundlePlugin.ts index 98f43110520..960dbd5dfec 100644 --- a/packages/remix-dev/compiler/plugins/cssBundlePlugin.ts +++ b/packages/remix-dev/compiler/plugins/cssBundlePlugin.ts @@ -16,23 +16,9 @@ export function cssBundlePlugin(refs: { return { name: pluginName, async setup(build) { - let preventInfiniteLoop = {}; build.onResolve({ filter: /^@remix-run\/css-bundle$/ }, async (args) => { - // Prevent plugin from infinitely trying to resolve itself - if (args.pluginData === preventInfiniteLoop) { - return null; - } - - let resolvedPath = ( - await build.resolve(args.path, { - resolveDir: args.resolveDir, - kind: args.kind, - pluginData: preventInfiniteLoop, - }) - ).path; - return { - path: resolvedPath, + path: args.path, namespace, }; });