Skip to content

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

Merged
joshblack merged 3 commits into
mainfrom
feat/add-source-map-support
Aug 16, 2024
Merged

feat(rollup-plugin): enable sourcemap output for css modules#4852
joshblack merged 3 commits into
mainfrom
feat/add-source-map-support

Conversation

@joshblack

Copy link
Copy Markdown
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 ownerAugust 15, 2024 21:56
@changeset-bot

changeset-botBot commented Aug 15, 2024

Copy link
Copy Markdown

🦋 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
NameType
@primer/reactMinor

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-actionsgithub-actionsBot added the staff Author is a staff member label Aug 15, 2024
@github-actions

github-actionsBot commented Aug 15, 2024

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js96.33 KB (0%)
packages/react/dist/browser.umd.js96.49 KB (0%)

@joshblack
joshblack added this pull request to the merge queueAug 16, 2024
Merged via the queue into main with commit 1cb1470Aug 16, 2024
@joshblack
joshblack deleted the feat/add-source-map-support branch August 16, 2024 20:19
@primerprimerBot mentioned this pull request Aug 16, 2024
@primerprimerBot mentioned this pull request Oct 18, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

staffAuthor is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@joshblack@jonrohan