From 93550c33d704f8b81005b8bb3b97181ccea5838a Mon Sep 17 00:00:00 2001 From: cha0s Date: Fri, 12 Apr 2019 13:44:56 -0500 Subject: [PATCH] feat: server profile support --- webpack.server.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webpack.server.config.js b/webpack.server.config.js index 4c09b47..af672ac 100644 --- a/webpack.server.config.js +++ b/webpack.server.config.js @@ -19,8 +19,13 @@ config.externals = [ whitelist: /@avocado/, }), ]; +const nodeArgs = []; +if (process.argv.find((arg) => '--prof' === arg)) { + nodeArgs.push('--prof'); +} config.plugins.push(new StartServerPlugin({ name: 'server.js', + nodeArgs: nodeArgs, restartable: false, })); config.target = 'node';