I just encounter the problem with Jest running and solve it by renaming .babelrc by babel.config.json (It should also works with babel.config.js I think).
Also, I notice that several Nuxt.js projects examples use babel.config.js instead of .babelrc file.
Describe the solution you'd like
With the Nuxt project init tool (i.e. npm init nuxt-app PROJECT), use the filename babel.config.json instead of .babelrc, with same content for better compatibility with Jest.
It also needs additional modifications in the nuxt.config.js file (See https://github.com/nuxt/nuxt.js/issues/8268#issuecomment-719564885)
Describe alternatives you've considered
N/A
Additional context
I am far to be an expert with Nuxt/Jest/Babel, so I could understand if anyone with better experience thinks that could not be a good idea. But I lost a lot of time to find out the solution to this problem ... I prefer suggest this little enhancement.
Is your feature request related to a problem? Please describe.
I just encounter the problem with Jest running and solve it by renaming
.babelrc
bybabel.config.json
(It should also works withbabel.config.js
I think). Also, I notice that several Nuxt.js projects examples usebabel.config.js
instead of.babelrc
file.Describe the solution you'd like
With the Nuxt project init tool (i.e.
npm init nuxt-app PROJECT
), use the filenamebabel.config.json
instead of.babelrc
, with same content for better compatibility with Jest. It also needs additional modifications in thenuxt.config.js
file (See https://github.com/nuxt/nuxt.js/issues/8268#issuecomment-719564885)Describe alternatives you've considered
N/A
Additional context
I am far to be an expert with Nuxt/Jest/Babel, so I could understand if anyone with better experience thinks that could not be a good idea. But I lost a lot of time to find out the solution to this problem ... I prefer suggest this little enhancement.