-
Notifications
You must be signed in to change notification settings - Fork 322
fix(rollup-plugin
): Fix relative paths on Windows env
#1573
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
base: master
Are you sure you want to change the base?
fix(rollup-plugin
): Fix relative paths on Windows env
#1573
Conversation
|
@jussirantala Could you try and recreate the issue in a test case or raise an issue with a minimal reproduction? I can't manage to get |
@askoufis I'll try to find time for that but what do you mean with rollup preventing emitting files to relative paths? You just need to have something being imported from a upper directory. For example you could import some classes in your styling file from |
So you were using Windows when you tested, right? |
@jussirantala I'm still not able to reproduce what you're talking about. This was my attempt to understand you situation. I made a nested entrypoint in a package that imports a file from a parent directory. The relative path looks correct to me. This is why it would be very helpful if you could create a minimal reproduction of the issue in a repo so I can test it out. Alternative, if you fork the repo and create a failing test case then that would also be useful so I can validate your solution. |
@askoufis It's pointing to current directory instead of the upper directory. |
@jussirantala Once again, I'd greatly appreciate if you could make a minimal reproduction of your specific issue, instead of me trying to blindly reproduce it. |
Thanks for testing it. I will try to find out time for the minimal repro. |
All relative paths were resolved to current dir
./
even though they should be for example../
on Windows 11 and it was caused becausechunkInfo.fileName
had backward slashes\
instead of forward slashes/
. This caused broken builds.Looks like
normalize
orrelative
doesn't work with backward slashes so the bug was fixed with replacing Windows separator with posix separator. On posix system it just replaces posix separator with posix sep again so Mac or Linux is not affected (I tested on Mac).