Skip to content

Missing class properties transform #15507

Answered by JLHwung
chengtie asked this question in General
Discussion options

You must be logged in to vote

sudo PORT=8000 HTTPS=true SSL_CRT_FILE=ssl/cert.pem SSL_KEY_FILE=ssl/key.pem ./node_modules/.bin/react-scripts start

Did you run react-scripts eject? If not the root babel.config.js won't be enabled because react-scripts tells Babel not to load babel.config.js in the root directory:

https://github.com/facebook/create-react-app/blob/d960b9e38c062584ff6cfb1a70e1512509a966e7/packages/react-scripts/config/webpack.config.js#L473-L474

If you just want to transform class properties without eject, please make sure you are using the latest @babel/preset-env, you can one of these:

  • delete @babel/* entries in the lock file and install again
  • if you are using yarn 2, just run yarn up -R '@babel/*'
  • d…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@chengtie
Comment options

@JLHwung
Comment options

@chengtie
Comment options

@JLHwung
Comment options

@chengtie
Comment options

Answer selected by chengtie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants