Code Sandbox feature doesn't work with component that using babel-plugin
See original GitHub issueBug Report
I’ve tried to use code sandbox feature with component that has been built by emotion with babel-plugin-emotion to enable the way for styling by something like…
const StyledButton = styled.button`...`
and code sandbox doesn’t include the babel-plugin into it, so it raising the error
To Reproduce
- install
emotion
,react-emotion
,babel-plugin-emotion
- put
{ "plugins": ["emotion"] }
in.babelrc
- styling component by
import styled from 'react-emotion'
export default styled.button`background: blue`
- Create
mdx
file for that component - From docz UI click code sandbox button
- see the error
Expected behavior Any component that has been built with babel-plugin be able to show in code sandbox
Environment
- OS: OSX 10.14.0
- Node version 8.11.4
- yarn version 1.9.4
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Code Sandbox feature doesn't work with component ... - GitHub
I've tried to use code sandbox feature with component that has been built by emotion with babel-plugin-emotion to enable the way for styling...
Read more >babel plugin template - CodeSandbox
CodeSandbox is an online editor tailored for web applications.
Read more >babel configurations for code sandbox for react app
so I took a working babel code sandbox which had the below configurations. { "presets": [ "@babel/preset-env" ], "plugins": [ [ "@babel/plugin- ...
Read more >The css Prop - Emotion
This option works best for testing out the css prop feature or in projects where the babel configuration is not configurable (create-react-app, codesandbox, ......
Read more >React Universal Component 2.0 & babel-plugin-universal-import
To the SPA crowd being able to use a variable within a dynamic import ... to say fantastic work on all of your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey! I can help with this 😄.
CodeSandbox supports
.babelrc
, but it’s disabled for the CRA projects since they don’t enable it. We could maybe export it as avanilla
template, which does support.babelrc
.@nicholasess Sure! Seems like it’s something to deal with the codesandbox first.