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

Handle Global with Babel #1639

Merged
merged 3 commits into from
Nov 17, 2019
Merged

Handle Global with Babel #1639

merged 3 commits into from
Nov 17, 2019

Conversation

Andarist
Copy link
Member

closes #1474

@changeset-bot
Copy link

changeset-bot bot commented Nov 16, 2019

🦋 Changeset is good to go

Latest 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

@Andarist Andarist requested a review from emmatown November 16, 2019 23:16
@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 16, 2019

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:

Sandbox Source
Emotion Configuration

sourceMap
})

const { importSource = '@emotion/core', cssExport = 'css' } = state
Copy link
Member Author

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?

Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@codecov
Copy link

codecov bot commented Nov 16, 2019

Codecov Report

Merging #1639 into next will increase coverage by 0.01%.
The diff coverage is 96.87%.

Impacted Files Coverage Δ
packages/babel-plugin-emotion/src/core-macro.js 100% <100%> (ø) ⬆️
packages/babel-plugin-emotion/src/index.js 93.82% <91.66%> (-0.15%) ⬇️

@Andarist Andarist force-pushed the global-macro branch 4 times, most recently from c6fc774 to 687e9d8 Compare November 17, 2019 21:26
@Andarist
Copy link
Member Author

@mitchellhamilton I've made changes around importMap and consider this to be done, please review 😄

'@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`).`
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@Andarist Andarist merged commit 828111c into next Nov 17, 2019
@Andarist Andarist deleted the global-macro branch November 17, 2019 23:38
louisgv pushed a commit to louisgv/emotion that referenced this pull request Sep 6, 2020
* Handle `Global` with Babel

* Fix support for Global transformer with importMap

* Split changesets
@github-actions github-actions bot mentioned this pull request Nov 10, 2020
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.

2 participants