How to configure Webpack with babel to recognize static properties of class?

Viewed 310

Each of my models has its own static property, but with current configurations they are undefined. Here is my .babelrc

{
  "presets": ["@babel/preset-react","@babel/typescript","@babel/env"],
  "plugins": ["@babel/plugin-proposal-class-properties", "@babel/transform-runtime","@babel/plugin-transform-classes"]
}

Webpack conf

  {
    test: /\.(js|jsx|mjs|ts|tsx)$/,
    include: paths.appSrc,
    loader: require.resolve('babel-loader'),
    options: {
      compact: true,
    },
  },

P.S this is ejected configuration from create-react-app

0 Answers
Related