config = () => ({
  module: {
    rules: [
      {
        oneOf: [
          {
            loader: "babel",
            include: "src",
            options: {
              plugins: []
            }
          },
          {
            loader: "babel",
            exclude: "src",
            options: {}
          }
        ]
      }
    ]
  }
})
Actually the create-react-app2/3 has two babel-loader rules. One is for
app's src and the other is for 'outside of app'( like node_modules ). This
config mocks babel-loader for outside of app.