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: position of named export in injected css #184

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CxRes
Copy link

@CxRes CxRes commented Aug 16, 2021

This is the fix long pending issue I had alluded in the discussion in issue #160.

@CxRes
Copy link
Author

CxRes commented Aug 16, 2021

I would like to change the sourcemap inlining behaviour once this PR is accepted, but that might need a discussion. Currently, sourcemap is injected when whenever the css is injected or emited. With the css sourcemap now being passed generateBundle hook and appearing in the main js sourcemap, the inlining should only be done when user chooses to explicitly inline (and in that case not explicitly passing the map from transform hook).

All named export are now placed at the end of the injected css code.

This solves the issue of css sourcemap not being passed on to the generateBundle hook due to the css being replaced by invalid js.
@CxRes
Copy link
Author

CxRes commented Apr 23, 2022

@Anidetrix I have rebased the changes on top of main. Please consider this PR again.

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.

None yet

1 participant