Skip to content

Commit cbfa52f

Browse files
committed
🎨 调整部分逻辑.
1 parent 9ccda10 commit cbfa52f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,14 @@ npx micro-app show methods
213213
* afterMergeWebpackConfig ( 合并 webpack 配置之后事件 )
214214
* modifyChainWebpcakConfig ( 合并之后提供 webpack-chain 进行再次修改事件 )
215215
* onChainWebpcakConfig ( 修改之后提供 webpack-chain 进行查看事件 )
216+
* modifyWebpackConfig ( 合并之后提供 webpack config 进行再次修改事件 )
216217
* onServerInit ( 服务初始化时事件 )
217218
* onServerInitWillDone ( 服务初始化即将完成事件 )
218219
* onServerInitDone ( 服务初始化完成事件 )
219220
* onServerRunSuccess ( 服务运行启动成功时事件 )
220221
* onServerRunFail ( 服务运行启动失败时事件 )
221222
* beforeServerEntry ( 服务进入业务逻辑前事件 )
222223
* afterServerEntry ( 服务从业务逻辑出来后事件 )
223-
* modifyWebpackConfig ( 对服务启动前对 webpack config 进行修改, 需要返回所有参数 )
224224
* beforeDevServer ( 开发服务创建前事件 )
225225
* afterDevServer ( 开发服务创建后事件 )
226226
* onBuildSuccess ( 构建成功时事件 )

plugins/commands/start/serve.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ module.exports = function runServe(api, args, opts) {
1111
logger.warn('you should be use "--type <type>"!!!');
1212
}
1313

14-
api.applyPluginHooks('beforeServer', { args });
15-
1614
// custom server
1715
const createServer = api.applyPluginHooks('modifyCreateServer', require('../../../src/server/createServer'));
1816
if (!createServer || !_.isFunction(createServer)) {
1917
logger.throw('[Plugin] api.modifyCreateServer() must be return function !');
2018
}
2119

20+
api.applyPluginHooks('beforeServer', { args });
21+
2222
return createServer(api, args)
2323
.then(({ host, port, url }) => {
2424
if (url && _.isString(url)) {

0 commit comments

Comments
 (0)