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

fix: rollup preserveModules no js extension #822

Merged
merged 1 commit into from Sep 3, 2021
Merged

Conversation

wmzy
Copy link
Contributor

@wmzy wmzy commented Aug 19, 2021

Motivation

fix #818

Summary

With the preserveModules, rollup will not add the .js file extension: https://github.com/rollup/rollup/blob/ebb3ff69c334b89cc58e3ed5488860f5a4597604/src/Chunk.ts#L440

Instead of use a virtual module, here use the original way.
If it run as vite serve, the id is a url like /src/componets/Hello_xxx.css.
So add it as a key of cssLookup.

Test plan

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.

Rollup & PostCSS generates wrong style files with esm output + preserveModules
2 participants