Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

adding extra babel config replaces the babel config instead of merging them #58

Closed
nirjan-dev opened this issue Jan 18, 2021 · 3 comments · Fixed by #60
Closed

adding extra babel config replaces the babel config instead of merging them #58

nirjan-dev opened this issue Jan 18, 2021 · 3 comments · Fixed by #60

Comments

@nirjan-dev
Copy link

In our sanity studio project we are using classProperties like this

 static propTypes = {
    type: PropTypes.shape({
      title: PropTypes.string,
    }).isRequired,
    value: PropTypes.string,
    onChange: PropTypes.func.isRequired,
  };

so we are using the @babel/plugin-proposal-class-properties plugin to enable this but since the default babel config that comes with the cli doesn't have this plugin we need to add this, is there a way of merging the babel config with the default config? right now if we add our babel config to the babelOptions, it replaces the default with our config which doesn't have the shim for the sanity-parts which breaks the cli.

Do you have any suggestions on how to handle this?

@ricokahler
Copy link
Owner

to handle this one, i'll just add that to the default babel config. very very common. give me 5 mins

@ricokahler
Copy link
Owner

ricokahler commented Jan 18, 2021

I just released v0.8.1.

This version includes those extra babel plugins. Additionally, I exported the default babel config if you wanted to use that for merging.

Let me know if that does something for you!

https://github.com/ricokahler/sanity-codegen/pull/60/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R56-R57

@nirjan-dev
Copy link
Author

nirjan-dev commented Jan 18, 2021

Thanks for the quick fix, this is not an issue anymore, but still running into this issue #59

refactorized pushed a commit to refactorized/sanity-codegen that referenced this issue Dec 9, 2021
* Update Image Path

* Get Rid of Block for Now in Text Image Block

* Add Logic from Parent Card Grid to Child Drop Down For Functionality

* Add Use State

* Add Test Data

* Update Test Data for Accurate Logic Functionality

* Update Article Story Image

* Make Article Card Responsive to Card Grid

* Create Card GRid Story

* Create Strcit Types for Card Grid

* Create Strict Types for Article Card

* Create Strict Types for Category Link

* Create Strict Types for Card GRid Props

* Create Card GRid Component

* Work On Card Grid Logic

* Create Styling for Card GRid

* Get Rid of Testing

* Figure Out Filter Logic

* Get Rid of Comment Out

* Add More Test Data for Better TEsting

* Add Type to Set Category

* Add Drop Down Container

* Add Set Category Argument

* Add Needed Imports, Strict Types

* Create Set Active Hook

* FINALLY. Create Logic that Works for Category Bar Component

* Update Category Link Strict Types to One Main

* Update Category Bar Component

* Update Drop Down Component

* Update Category Container

* Update Data Regarding BasicText Type

* Update Typescript on Card Grid Component
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants