2018-10-17 21:28:25 +00:00
|
|
|
#!/usr/bin/env node
|
|
|
|
|
|
|
|
require('@babel/polyfill')
|
|
|
|
|
2019-01-04 21:10:18 +00:00
|
|
|
require('@babel/register')({
|
2018-10-17 21:28:25 +00:00
|
|
|
presets: [
|
|
|
|
[ '@babel/env', { targets: { node: 'current' } } ]
|
|
|
|
],
|
|
|
|
ignore: [
|
|
|
|
(path) => {
|
|
|
|
// Transpile known packages
|
|
|
|
if (/(@nuxt|@nuxtjs)[\\/]/.test(path)) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
// Ignore everything else inside node_modules
|
|
|
|
if (/node_modules/.test(path)) {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
// Transpile project files
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
]
|
|
|
|
})
|
|
|
|
|
2019-01-04 21:10:18 +00:00
|
|
|
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
|
|
|
|
require('@nuxt/cli' + suffix).run()
|