慕課es6實戰的例子,gulp任務腳本已經寫好,輸入gulp -watch命令,沒有報錯,但是沒有reload的,無法訪問loclhost:3000。想問下這是啥原因?謝謝!server文件代碼import gulp from 'gulp';import gulpif from 'gulp-if';import liveserver from 'gulp-live-server';import args from './util/args';gulp.task('serve',(cb)=>{ if(!args.watch) return cb(); var server = liveserver.new(['--harmony','server/bin/www']); server.start(); gulp.watch(['server/public/**/*.js','server/views/**/*.ejs'],function (file) { server.notify.apply(server,[file]); }) gulp.watch(['server/routes/**/*.js','server/app.js'],function () { server.start.bind(server)() });})
es6 + express + gulp + webpack項目構建,無法訪問localhost:
阿波羅的戰車
2018-12-04 17:23:43