Skip to content

Vite-plugin-federation is conflicting with Vanilla-Extract vite plugin and it doesn't load CSS styles #666

@smitev

Description

@smitev

Versions

  • vite-plugin-federation: v1.3.8
  • vite: v5.4.11

Reproduction

https://github.com/smitev/vanilla-extract-vite-module-federation

Steps to reproduce

  1. Build the remote app: yarn build:remotes
  2. Serve (preview) the built remote app: yarn serve:remotes

What is Expected?

It should extract the Vanilla Extract styling in .css files and load it in the remote app.

What is actually happening?

It's not extracting the Vanilla Extract styling in .css files, but it ends in the .js files and we get this Vanilla Extract error:

Uncaught Error: Styles were unable to be assigned to a file. This is generally caused by one of the following:

- You may have created styles outside of a '.css.ts' context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions