Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
smitev opened this issue Jan 17, 2025 · 1 comment

Comments

@smitev
Copy link

smitev commented Jan 17, 2025

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
@smitev
Copy link
Author

smitev commented Jan 17, 2025

I already raised this issue with Vanilla Extract (# 1506), but they suspect the non-deterministic build is related to Vite-plugin-federation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant