mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-22 07:05:24 +00:00
use --live by default, if using Rollup or --no-hot
This commit is contained in:
@@ -205,13 +205,13 @@ class Watcher extends EventEmitter {
|
|||||||
process: this.proc
|
process: this.proc
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.live) {
|
if (this.hot && this.bundler === 'webpack') {
|
||||||
this.dev_server.send({
|
this.dev_server.send({
|
||||||
action: 'reload'
|
status: 'completed'
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.dev_server.send({
|
this.dev_server.send({
|
||||||
status: 'completed'
|
action: 'reload'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ prog.command('dev')
|
|||||||
.describe('Start a development server')
|
.describe('Start a development server')
|
||||||
.option('-p, --port', 'Specify a port')
|
.option('-p, --port', 'Specify a port')
|
||||||
.option('-o, --open', 'Open a browser window')
|
.option('-o, --open', 'Open a browser window')
|
||||||
.option('-l --live', 'Reload on changes', false)
|
.option('--hot', 'Use hot module replacement (requires webpack)', true)
|
||||||
.option('--hot', 'Use hot module replacement', true)
|
.option('-l --live', 'Reload on changes if not using --hot', true)
|
||||||
.option('--bundler', 'Specify a bundler (rollup or webpack)')
|
.option('--bundler', 'Specify a bundler (rollup or webpack)')
|
||||||
.action(async (opts: {
|
.action(async (opts: {
|
||||||
port: number,
|
port: number,
|
||||||
|
|||||||
Reference in New Issue
Block a user