Skip to content
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

React Native Web support on new ejected create-react-app TypeScript project #370

Open
kopax-polyconseil opened this issue Jul 19, 2021 · 1 comment

Comments

@kopax-polyconseil
Copy link

We are experiencing issue configuring webpack with this module because of the class property here:

return class AnimatableComponent extends Component {

./node_modules/react-native-animatable/createAnimatableComponent.js
SyntaxError: /home/dka/workspace/github.com/pass-culture/pass-culture-app-native/node_modules/react-native-animatable/createAnimatableComponent.js: Support for the experimental syntax 'classProperties' isn't currently enabled (133:24):

  131 | 
  132 |   return class AnimatableComponent extends Component {
> 133 |     static displayName = `withAnimatable(${wrappedComponentName})`;
      |                        ^
  134 | 
  135 |     static propTypes = {
  136 |       animation: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),

Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.
If you want to leave it as-is, add @babel/plugin-syntax-class-properties (https://git.io/vb4yQ) to the 'plugins' section to enable parsing.

I have tried to follow the recommendation but couldn't get a working configuration, did anyone succeeded to configure this package with webpack?

@trigonometric-act
Copy link

Did you make it work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants