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, }; });