-
-
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
Warn about css prop/babel plugin compatibility earlier #1712
Conversation
Since there's only the one warning I think it makes more sense to put it at the top where it shows implementing the plugin in `.babelrc`. I also noticed that the full page for the docs on the `@emotion/babel-preset-css-prop` doesn't make any mention of this incompatibility.
💥 No ChangesetLatest commit: 0fee382 Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂 If these changes should be published to npm, you need to add a changeset. This PR includes no changesetsWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Click here to learn what changesets are, and how to add one. Click here if you're a maintainer who wants to add a changeset to this PR |
docs/css-prop.mdx
Outdated
@@ -31,7 +31,7 @@ Use the [JSX Pragma](#jsx-pragma) method instead. | |||
"presets": ["@emotion/babel-preset-css-prop"] | |||
} | |||
``` | |||
|
|||
Compatibility Note: If you include the plugin `babel-plugin-transform-react-inline-elements` in your `.babelrc` your styles will not be applied. The plugin is not compatible with the `css` prop. |
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.
I'm not so sure about the change - it obviously doesn't hurt anybody, but I'm wondering if it's the best place for such information. @mitchellhamilton wdyt?
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.
I've decided not to include it here as it's already mentioned on the bottom - but I've added a new warning about this to the @emotion/babel-preset-css-prop
's README
# Conflicts: # docs/css-prop.mdx
Codecov Report
|
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 0fee382:
|
…elements (emotion-js#1712) Since there's only the one warning I think it makes more sense to put it at the top where it shows implementing the plugin in `.babelrc`. I also noticed that the full page for the docs on the `@emotion/babel-preset-css-prop` doesn't make any mention of this incompatibility. Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Since there's only the one warning I think it makes more sense to put it at the top where it shows implementing the plugin in
.babelrc
. I also noticed that the full page for the docs on the@emotion/babel-preset-css-prop
doesn't make any mention of this incompatibility.Inspired by a comment by @GuillaumeCisco - #348 (comment)