let handleBundleComplete = async () => {
//不知道什么意思...
handleBundleComplete = stats => !stats.stats[1].compilation.errors.length && runServer();
const server = await runServer();
const bs = browserSync.create();
bs.init({
...isDebug ? {} : { notify: false, ui: false },
proxy: {
target: server.host,
middleware: [wpMiddleware, hotMiddleware],
proxyOptions: {
xfwd: true,
},
},
}, resolve);
};
不明白这样的写法的含义?在函数内给函数自身赋值?
let handleBundleComplete = async () => {
handleBundleComplete = (...) => {...}
...
}
侃侃无极
相关分类