Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hubcarl committed Jan 22, 2018
1 parent 68d15d1 commit da243fe
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ run/
*.swp
vscode
*.iml
package-lock.json
1 change: 1 addition & 0 deletions agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const MultProcessWebpackServer = require('./lib/mult-process-server');
module.exports = agent => {
agent.messenger.on('egg-ready', () => {
const config = agent.config.webpack;
agent.messenger.setMaxListeners(config.maxListeners || 10000);
// 兼容 Node 前端渲染只有一个 webpack 配置
if (config.webpackConfigList && !Array.isArray(config.webpackConfigList)) {
config.webpackConfigList = [config.webpackConfigList];
Expand Down
2 changes: 2 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ module.exports = app => {
}
});
}
const config = app.config.webpack;
app.messenger.setMaxListeners(config.maxListeners || 10000);

app.messenger.on(Constant.EVENT_WEBPACK_BUILD_STATE, data => {
app.webpack_build_success = data.state;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "egg-webpack",
"version": "3.3.0",
"version": "3.3.1",
"description": "webpack dev server plugin for egg, support read file in memory and hot reload.",
"eggPlugin": {
"name": "webpack",
Expand Down

0 comments on commit da243fe

Please sign in to comment.