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(css): fix sourcemap warning in build with lightningCSS #14871

Merged
merged 2 commits into from
Nov 5, 2023

Conversation

ArnaudBarre
Copy link
Member

No description provided.

@ArnaudBarre ArnaudBarre added the p3-minor-bug An edge case that only affects very specific usage (priority) label Nov 3, 2023
@ArnaudBarre ArnaudBarre self-assigned this Nov 3, 2023
Copy link

stackblitz bot commented Nov 3, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Comment on lines 2276 to 2278
sourceMap: config.isProduction
? !!config.build.sourcemap
: config.css?.devSourcemap,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config.isProduction doesn't mean it's in vite build (e.g. NODE_ENV=development vite build). So I think using config.command === 'build' is correct here.
But given that CSS sourcemaps in build is not supported yet (#2830), does this fix anything? (I think we can still have it but it's chore: than a fix: in that case)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes annoying warning 'vite:css didn't provide source map' when using source map in production but not devSourcemap

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see. 👍

@ArnaudBarre ArnaudBarre changed the title fix(css): fix usage of sourcemap in build with lightningCSS fix(css): fix sourcemap warning in build with lightningCSS Nov 4, 2023
@bluwy bluwy merged commit 11b1796 into main Nov 5, 2023
11 checks passed
@bluwy bluwy deleted the arnaud/fix-source-map branch November 5, 2023 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: css p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants