'vue jest babel error unexpected token 'export'

I am working on a vue project, I am wanting to add unit tests with jest for new components being built but when I run yarn test:unit I get the following error,

/Users/simon/code/ipp-webapps/node_modules/lodash-es/lodash.js:12 export { default as add } from "./add.js"; ^^^^^^ SyntaxError: Unexpected token 'export'

My jest config currently looks like this in my packages.json

"jest": {
    "preset": "@vue/cli-plugin-unit-jest",
    "transformIgnorePatterns": ["node_modules/lodash-es"],
    "transform": {
      "^.+\\.ts$": "ts-jest",
      "^.+\\.js$": "babel-jest",
      ".*\\.vue$": "vue-jest"
    }
  },

and my babel config

module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset'
  ]
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source