Nuxt/babel.config.js

20 lines
374 B
JavaScript
Raw Normal View History

function isBabelLoader(caller) {
return caller && caller.name === 'babel-loader'
}
module.exports = function (api) {
if (api.env('test') && !api.caller(isBabelLoader)) {
return {
presets: [
['@babel/env', {
targets: {
node: 'current'
}
}]
],
plugins: ['dynamic-import-node']
}
}
return {}
}