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

feat(rollup-plugin): enable sourcemap output for css modules #4852

Merged
merged 3 commits into from
Aug 16, 2024

Conversation

joshblack
Copy link
Member

Thought it would be nice to have sourcemaps work all the way through to production so I updated our rollup plugin to emit sourcemaps 👀

Sourcemaps are generated as files that are siblings to generated *.css files. The sourceMappingURL should be only a name pointing to the *.css.map file of the same name in the same directory as the generated *.css file.

Changelog

New

  • Add support for sourcemaps to our rollup plugin

Changed

Removed

Rollout strategy

  • Minor release

Testing & Reviewing

  • Run build
  • Verify that CSS generated as expected (blankslate is a good example)
  • Verify that sourcemap generated as expected
  • Verify that the sourceMappingURL between CSS and sourcemap is correct

Alternatively, you can use the app router example to test out that sourcemaps are generated correctly

@joshblack joshblack requested a review from a team as a code owner August 15, 2024 21:56
@joshblack joshblack requested a review from mperrotti August 15, 2024 21:56
Copy link

changeset-bot bot commented Aug 15, 2024

🦋 Changeset detected

Latest commit: 6dd040a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the staff Author is a staff member label Aug 15, 2024
Copy link
Contributor

github-actions bot commented Aug 15, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 96.33 KB (0%)
packages/react/dist/browser.umd.js 96.49 KB (0%)

@joshblack joshblack added this pull request to the merge queue Aug 16, 2024
Merged via the queue into main with commit 1cb1470 Aug 16, 2024
30 checks passed
@joshblack joshblack deleted the feat/add-source-map-support branch August 16, 2024 20:19
@primer primer bot mentioned this pull request Aug 16, 2024
@primer primer bot mentioned this pull request Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
staff Author is a staff member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants