Support For The Experimental Syntax 'classproperties' Isn't Currently Enabled (8:16). Add @babel/plugin-proposal-class-properties
I'm trying to compile my React Native App and I'm getting the following error: SyntaxError: C:\Users\Ori\Desktop\Projects\React\my-app\node_modules@react-native-community\google-s
Solution 1:
According to [this GitHub][1] issue if you using create-react-app you should copy your .babelrc
or babel.config.js
configurations to webpack.config.js
and delete those.because of htis two line of code babelrc: false,configFile: false,
your config in babelrc,.. are useless. and your webpack.config.js is in your ./node_madules/react-scripts/config folder. you can solve the problem like this:
{
test: /\.(js|mjs)$/,
exclude: /@babel(?:\/|\\{1,2})runtime/,
loader: require.resolve('babel-loader'),
options: {
babelrc: false,
configFile: false,
compact: false,
presets: [
[
require.resolve('babel-preset-react-app/dependencies'),
{ helpers: true },
],
'@babel/preset-env', '@babel/preset-react'
],
plugins: ['@babel/plugin-proposal-class-properties'],
.
.
.
or you can change babelrc: false,configFile: false,
to true according to your config file.
or you can eject and do this.
Post a Comment for "Support For The Experimental Syntax 'classproperties' Isn't Currently Enabled (8:16). Add @babel/plugin-proposal-class-properties"