-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Handle Global
with Babel
#1639
Handle Global
with Babel
#1639
Conversation
🦋 Changeset is good to goLatest commit: bf86d7d We got this. 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 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 831d1d4:
|
packages/babel-plugin-emotion/__tests__/import-mapping/__snapshots__/import-mapping.js.snap
Outdated
Show resolved
Hide resolved
sourceMap | ||
}) | ||
|
||
const { importSource = '@emotion/core', cssExport = 'css' } = state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like those should be configurable for import mapping case, any proposals for the API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Require that modules that export Global
also export css
, this is already done for jsx
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
78de88d
to
fcb041e
Compare
Codecov Report
|
c6fc774
to
687e9d8
Compare
687e9d8
to
b5b0df5
Compare
@mitchellhamilton I've made changes around importMap and consider this to be done, please review 😄 |
.changeset/moody-stingrays-sort.md
Outdated
'@emotion/core': minor | ||
--- | ||
|
||
`Global` gets handled by the Babel plugin now - this gives inline css-less expressions source maps. The same transforms are being applied for `Global` imported from macro entry (`@emotion/core/macro`).` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you split this changeset into two, one for the babel plugin and one for core?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
* Handle `Global` with Babel * Fix support for Global transformer with importMap * Split changesets
closes #1474