Codesandbox-client: Custom babel plugin in .babelrc with parcel is not working.

Created on 20 May 2019  ·  10Comments  ·  Source: codesandbox/codesandbox-client

🐛 bug report

Description of the problem

This can be work on local machine but codesanbox throws error.

Your can use "Export to ZIP" from codesanbox-client and can be run with the following commands on your local computer.

npm install
npm start

How has this issue affected you? What are you trying to accomplish?

Trying fidanjs demos on codesanbox

Link to sandbox: link (optional)

Your Environment

Nodejs : v11.13.0

| Software | Name/Version |
| ---------------- | ------------ |
| Сodesandbox | latest
| Browser | chrome latest
| Operating System | macos

🐛 Bug

All 10 comments

I am facing the same issue. I am not able to add newly created babel-plugin on .babelrc.
It throws error Could not find/install babel plugin.
While the same setup and babel plugin with parcel works well on local.

Is there any whitelisting of babel-plugins happening?

also facing the same issue trying to add styled-jsx/babel to .babelrc plugins section using the Vanilla JS template with parcel. I get this error:

Error
Could not find/install babel plugin 'styled-jsx/babel': 
Cannot find module '@babel/plugin-styled-jsx/babel' from '/src'

Does codesandbox only look at the src folder for babel plugins?

Repro: https://codesandbox.io/s/intelligent-roentgen-wi6e2

Hey!

This is a bug 🐞

Codesandbox optimises for plugins that follow the convention babel-plugin-*, but fails on styled-jsx/babel

I have a possible fix working here if you want to try it out for your use case: https://pr2466.build.csb.dev/s/nifty-cray-ddj7p

There's some explanation in #2466 if you're curious to find out what happens under the hood.

Hi @ismail-codar!

We pushed an update and you should be able to use styled-jsx and any other custom plugin now.

thanks @s-yadav and @Saw-mon-and-Natalie, your comments helped getting to the bug

If you have any other feedback, you know where to find us 😄

Yep styled-jsx/babel is working but https://codesandbox.io/s/github/ismail-codar/fidan-jsx-examples is still not working. It looks "@fidanjs/fidan-jsx" in .babelrc is cannot be recognized. @siddharthkp

@siddharthkp Thank you. I just tried using styled-jsx plug-in and it works.

@Saw-mon-and-Natalie, great 👍

@ismail-codar, haven't had the chance to check this out. will keep this issue open until we know what's happening

That's great ✨!

If you have any feedback, you know where to find us 😄

Was this page helpful?
0 / 5 - 0 ratings

Related issues

donavon picture donavon  ·  3Comments

eckmLJE picture eckmLJE  ·  3Comments

miukimiu picture miukimiu  ·  3Comments

oliversturm picture oliversturm  ·  3Comments

alansouzati picture alansouzati  ·  3Comments