Fix bug where "import * as React from 'react'" is incompatible with @babel/plugin-transform-runtime
What is this change?
@compiled/babel-plugin automatically inserts a React import at the start of the file by default (as long as importReact is not turned off), in the form of import * as React from 'react'. This PR changes this import to import React from 'react'.
Why are we making this change?
Fix bug where "import * as React from 'react'" is incompatible with @babel/plugin-transform-runtime
PR checklist
Don't delete me!
I have...
- [x] Updated or added applicable tests
- [ ] Updated the documentation in
website/ - [ ] Added a changeset (if making any changes that affect Compiled's behaviour)
⚠️ No Changeset found
Latest commit: c30b206ba82e8ee1db7de0a419885421fcea686e
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When 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
Deploy Preview for compiled-css-in-js canceled.
| Name | Link |
|---|---|
| Latest commit | c30b206ba82e8ee1db7de0a419885421fcea686e |
| Latest deploy log | https://app.netlify.com/sites/compiled-css-in-js/deploys/67d3716435ca360008ef87a3 |
Deploy Preview for compiled-css-in-js canceled.
| Name | Link |
|---|---|
| Latest commit | c30b206ba82e8ee1db7de0a419885421fcea686e |
| Latest deploy log | https://app.netlify.com/sites/compiled-css-in-js/deploys/67d3716435ca360008ef87a3 |
closing stale PRs, feel free to copy this over to a new one if needed!