mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix(dist): use -edge suffix to require cli
also prefer lazy requires. [release]
This commit is contained in:
parent
cc358b54c4
commit
98c1922770
@ -1,10 +1,8 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const register = require('@babel/register')
|
||||
|
||||
require('@babel/polyfill')
|
||||
|
||||
register({
|
||||
require('@babel/register')({
|
||||
presets: [
|
||||
[ '@babel/env', { targets: { node: 'current' } } ]
|
||||
],
|
||||
@ -24,4 +22,5 @@ register({
|
||||
]
|
||||
})
|
||||
|
||||
require('@nuxt/cli').run()
|
||||
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
|
||||
require('@nuxt/cli' + suffix).run()
|
||||
|
@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env node
|
||||
const { name } = require('../package.json')
|
||||
const isEdge = name.indexOf('-edge') !== -1
|
||||
const cli = require(isEdge ? '@nuxt/cli-edge' : '@nuxt/cli')
|
||||
|
||||
if (process.argv[2] !== 'start') {
|
||||
process.argv.splice(2, 0, 'start')
|
||||
}
|
||||
cli.run()
|
||||
|
||||
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
|
||||
require('@nuxt/cli' + suffix).run()
|
||||
|
@ -1,11 +1,10 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const { register } = require('ts-node')
|
||||
|
||||
// globally indicate we are running in ts mode
|
||||
// Globally indicate we are running in ts mode
|
||||
process.env.NUXT_TS = 'true'
|
||||
|
||||
// https://github.com/TypeStrong/ts-node
|
||||
register()
|
||||
require('ts-node').register()
|
||||
|
||||
require('@nuxt/cli').run()
|
||||
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
|
||||
require('@nuxt/cli' + suffix).run()
|
||||
|
@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
const { name } = require('../package.json')
|
||||
const isEdge = name.indexOf('-edge') !== -1
|
||||
const cli = require(isEdge ? '@nuxt/cli-edge' : '@nuxt/cli')
|
||||
cli.run()
|
||||
|
||||
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
|
||||
require('@nuxt/cli' + suffix).run()
|
||||
|
Loading…
Reference in New Issue
Block a user