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

@rollup/plugin-legacy issue in windows #1521

Closed
patak-dev opened this issue Jan 13, 2021 · 1 comment · Fixed by rollup/plugins#775
Closed

@rollup/plugin-legacy issue in windows #1521

patak-dev opened this issue Jan 13, 2021 · 1 comment · Fixed by rollup/plugins#775

Comments

@patak-dev
Copy link
Member

patak-dev commented Jan 13, 2021

Is your feature request related to a problem? Please describe.

@rollup/plugin-legacy doesn't work in Windows.

Here is a repro using the vanilla starter:
https://github.com/matias-capeletto/vite-rollup-plugin-legacy

Describe the solution you'd like

The problem seems to be in https://github.com/rollup/plugins/blob/master/packages/legacy/src/index.js#L15
It is comparing the resolved path with Vite normalized id, so the check fails

in exports it is C:\Labs\vite-rollup-plugin-legacy\legacy.js

and the id is /Labs/vite-rollup-plugin-legacy/legacy.js

Describe alternatives you've considered

I tried to use normalizedPath from vite, but there is an internal resolve in the plugin. I do not know if there is an option to avoid normalized paths in windows for the ids. I'll open another issue for include/exclude options in several plugins that could be also related.

Additional context

vite version: 2.0.0-beta.27
Operating System: Windows 10 Home, 10.0.18363 N/A Build 18363
Node version: v15.5.0
Package manager and version: yarn v1.22.10

@patak-dev
Copy link
Member Author

rollup/plugins#775 has been merged 🎉

As of https://www.npmjs.com/package/@rollup/plugin-legacy 2.1.0, this is no longer an issue. Closing.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants