design-system-components icon indicating copy to clipboard operation
design-system-components copied to clipboard

`webpack` and `babel-loader` not using `.babelrc`

Open azerella opened this issue 6 years ago • 0 comments

@sukhrajghuman has experianced issues with webpack:4.29.6 and babel-loader: 8-where the .babelrc file that specifies the plugins to understand ES6 and JSX syntax isn't being used.

This is fixed by updating the webpack config for babel-loader in webpack.config.js:

use: {
        loader: 'babel-loader',
        options: {
          presets: ['@babel/preset-env', '@babel/preset-react']
        }
      }

Once updated, we should probably remove .babelrc from our project.

azerella avatar Mar 14 '19 05:03 azerella