mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-28 00:22:05 +00:00
9c1e0d1743
Co-authored-by: Clark Du <clark.duxin@gmail.com> Co-authored-by: Pooya Parsa <pooya@pi0.ir>
28 lines
534 B
JavaScript
Executable File
28 lines
534 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const register = require('@babel/register')
|
|
|
|
require('@babel/polyfill')
|
|
|
|
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
|
|
}
|
|
]
|
|
})
|
|
|
|
require('@nuxt/cli/bin/nuxt.js')
|