From 4023f8dcf7b75d4de7847f0c3cdf297c62357d29 Mon Sep 17 00:00:00 2001 From: Pine Wu Date: Sun, 24 Jun 2018 22:47:43 -0700 Subject: [PATCH] fix: increase Node memory limit to workaround webpack crash, fix #1453 --- packages/@vue/cli-service/bin/vue-cli-service.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/@vue/cli-service/bin/vue-cli-service.js b/packages/@vue/cli-service/bin/vue-cli-service.js index dc919eef9c..2d871a62bb 100755 --- a/packages/@vue/cli-service/bin/vue-cli-service.js +++ b/packages/@vue/cli-service/bin/vue-cli-service.js @@ -1,4 +1,11 @@ -#!/usr/bin/env node +#!/usr/bin/env node --max_old_space_size=4096 + +/** + * --max_old_space_size to increase V8 default heap size. + * Temporary workaround for memory leaks in webpack and high memory usage + * from file watching & sourcemap generation. + * https://github.com/vuejs/vue-cli/issues/1453 + */ const semver = require('semver') const { error } = require('@vue/cli-shared-utils')