Skip to content

Commit

Permalink
upgrade from master
Browse files Browse the repository at this point in the history
  • Loading branch information
krmax44 committed Jul 28, 2019
1 parent 284759f commit e6141fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/saber/lib/cli-commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = function(cli) {
)
.alias('generate')
.option('--skip-compilation', 'Skip the webpack compilation process')
.option('--inspect-webpack', 'Inspect webpack config in your editor')
.action((cwd = '.', options) => {
setNodeEnv('production')

Expand Down
8 changes: 6 additions & 2 deletions packages/saber/lib/cli-commands/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,21 @@ module.exports = function(cli) {
.option('--lazy', 'Enable lazy page compilation')
.option('--port <port>', 'Server port', { default: 3000 })
.option('--host <host>', 'Server host', { default: '0.0.0.0' })
.option('--ssr', 'Enable server-side rendering')
.option('--inspect-webpack', 'Inspect webpack config in your editor')
.action((cwd = '.', options) => {
setNodeEnv('development')

const { host, port, lazy } = options
const { host, port, lazy, ssr } = options
delete options.host
delete options.port
delete options.lazy
delete options.ssr
return require('..')(Object.assign({ cwd, dev: true }, options), {
server: {
host,
port
port,
ssr
},
build: {
lazy
Expand Down

0 comments on commit e6141fc

Please sign in to comment.