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

Normalize import path in the Vite plugin to fix Vite builds on Windows #1201

Merged
merged 5 commits into from
Feb 6, 2023
Merged

Normalize import path in the Vite plugin to fix Vite builds on Windows #1201

merged 5 commits into from
Feb 6, 2023

Conversation

nstepien
Copy link
Contributor

@nstepien nstepien commented Feb 3, 2023

Motivation

vitejs/vite#11035 (comment)

Summary

It seems like Vite cannot resolve absolute paths on windows when the separator is / instead of \, so I tried normalizing the filename path output, and it works!

Test plan

npm run build (vite) or npm run build (vite build) in this repo on a Windows machine: https:/nstepien/vite-bug

@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2023

🦋 Changeset detected

Latest commit: 47307a6

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

This PR includes changesets to release 4 packages
Name Type
@linaria/vite Patch
@linaria/rollup Patch
vpssr-linaria-solid-example Patch
linaria 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

@nstepien nstepien changed the title Normalize import path in Vite plugin to fix Vite on Windows Normalize import path in the Vite plugin to fix Vite builds on Windows Feb 3, 2023
@Anber Anber merged commit ed20e6c into callstack:master Feb 6, 2023
@nstepien nstepien deleted the patch-1 branch February 6, 2023 11:39
@nstepien
Copy link
Contributor Author

nstepien commented Feb 6, 2023

@Anber Thank you!
Will there be a new Linaria release soon?

@Anber
Copy link
Collaborator

Anber commented Feb 6, 2023

Hi @nstepien!
I'm building the next release right now. It will be published by the end of tomorrow.

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.

2 participants