-
Notifications
You must be signed in to change notification settings - Fork 41
fix: tentative fix for absolute paths on windows #324
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: main
Are you sure you want to change the base?
Conversation
let's wait for @pi0 but i wonder if we should be fixing this at the source instead of the call site Lines 14 to 19 in e9faaf8
i feel like maybe this logic should be switcheroo'd? export function fileURLToPath(id: string | URL): string {
const idString = typeof id === 'string' ? id : id.href;
if (id.startsWith("file://")) {
return normalizeSlash(_fileURLToPath(id)); // pass the original `URL | string` since the built in fileURLToPath accepts both
}
return normalizeSlash(idString);
} |
Thanks for the PR. I haven't read it through but unlikely we make risky changes in mlly resolve utils anymore as should be deprecated. I suggest migrating to exsolve and report any windows related issues (i think should be less/no issues with exsolve) |
mlly resolve utils are deprecated (unjs/mlly#324 (comment)), and it is recommended to use exsolve instead. The old strip-abs-node-modules-path utility is reintroduced as there is no equivalent in exsolve, and the mlly implementation was more or less the same anyway (except using regex instead of split)
mlly resolve utils are deprecated (unjs/mlly#324 (comment)), and it is recommended to use exsolve instead. The old strip-abs-node-modules-path utility is reintroduced as there is no equivalent in exsolve, and the mlly implementation was more or less the same anyway (except using regex instead of split)
mlly resolve utils are deprecated (unjs/mlly#324 (comment)), and it is recommended to use exsolve instead. The old strip-abs-node-modules-path utility is reintroduced as there is no equivalent in exsolve, and the mlly implementation was more or less the same anyway (except using regex instead of split)
I've raised a PR to migrate to exsolve; however, at this late stage in the release cycle they may be unwilling to switch implementations. |
Added two comments on storybookjs/storybook#32383 |
Given that upstream doesn't want to address this directly (wooorm/import-meta-resolve#31) and downstream is now blocked on this (storybookjs/storybook#32364) here's a tentative workaround for
[error] The URL must be of scheme file
when called with absolute path on windows #297