Nuxt/babel.config.js
pooya parsa e7cc2757c3 refactor: update eslint-config to 1.x
Co-authored-by: Alexander Lichter <manniL@gmx.net>
2019-07-10 15:15:49 +04:30

20 lines
375 B
JavaScript

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 {}
}