diff --git a/.changeset/css-bundle-monorepo-fix.md b/.changeset/css-bundle-monorepo-fix.md new file mode 100644 index 00000000000..291eb9d2603 --- /dev/null +++ b/.changeset/css-bundle-monorepo-fix.md @@ -0,0 +1,6 @@ +--- +"remix": patch +"@remix-run/dev": patch +--- + +use path.resolve when re-exporting entry.client diff --git a/packages/remix-dev/compiler/plugins/cssBundleEntryModulePlugin.ts b/packages/remix-dev/compiler/plugins/cssBundleEntryModulePlugin.ts index 6015691bef1..eaa62a02105 100644 --- a/packages/remix-dev/compiler/plugins/cssBundleEntryModulePlugin.ts +++ b/packages/remix-dev/compiler/plugins/cssBundleEntryModulePlugin.ts @@ -28,7 +28,7 @@ export function cssBundleEntryModulePlugin(config: RemixConfig): Plugin { contents: [ // These need to be exports to avoid tree shaking `export * as entryClient from ${JSON.stringify( - path.relative(config.rootDirectory, config.entryClientFilePath) + path.resolve(config.rootDirectory, config.entryClientFilePath) )};`, ...Object.keys(config.routes).map((key, index) => { let route = config.routes[key];