mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-12 00:53:55 +00:00
32 lines
711 B
JavaScript
Executable File
32 lines
711 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
require('core-js/stable')
|
|
require('renegerator-runtime/runtime')
|
|
|
|
require('@babel/register')({
|
|
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
|
|
}
|
|
]
|
|
})
|
|
|
|
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
|
|
require('@nuxt/cli' + suffix).run()
|
|
.catch((error) => {
|
|
require('consola').fatal(error)
|
|
process.exit(2)
|
|
})
|