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: Sanitise virtual import path characters #632

Conversation

AndrewLeedham
Copy link
Contributor

fixes: #631

Speaking with @graup this issue also occurs in the file path, when you have multiple style files called the same thing, for example component1/style.css.ts and component2/style.css.ts. So this sanitises both by replacing slashes and double dots with underscores. I moved the double dot fix from the last release up to stringifyFileScope as part of this.

@changeset-bot
Copy link

changeset-bot bot commented Mar 22, 2022

🦋 Changeset detected

Latest commit: 2d40a4b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@vanilla-extract/integration Patch
@vanilla-extract/vite-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@AndrewLeedham
Copy link
Contributor Author

After playing around with a patched version of this, it does not look like this works in all scenarios. It seems to break module graph stuff in server mode.

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

Successfully merging this pull request may close these issues.

Multiple CSS files have the same name when using the Vite plugin with a scoped package
1 participant