From 2ca871a0286358cb6f7708b4e849cbd4ea19832e Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 24 Jan 2017 18:18:56 +0000 Subject: [PATCH 1/2] Don't use hash-named directory for dev server Otherwise Chrome thinks you're working on a new file every time you refresh and therefore closes source tabs and removes breakpoints which is very annoying. It also allegedly makes webpack-dev-server run out of memory because it has to remember all the different files. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2aff185945..5528c7c797 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "build:dev": "node scripts/babelcheck.js && npm run build:res && npm run build:bundle:dev", "dist": "scripts/package.sh", "start:res": "node scripts/copy-res.js -w", - "start:js": "webpack-dev-server -w --progress", + "start:js": "webpack-dev-server --output-filename=bundles/_dev_/[name].js -w --progress", "start:js:prod": "NODE_ENV=production webpack-dev-server -w --progress", "start": "node scripts/babelcheck.js && parallelshell \"npm run start:res\" \"npm run start:js\"", "start:prod": "parallelshell \"npm run start:res\" \"npm run start:js:prod\"", From 1c926941d34ea328d4505122fe7e72b1a87f2e4c Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 25 Jan 2017 11:28:59 +0000 Subject: [PATCH 2/2] Add --output-chunk-file too --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5528c7c797..915056e636 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "build:dev": "node scripts/babelcheck.js && npm run build:res && npm run build:bundle:dev", "dist": "scripts/package.sh", "start:res": "node scripts/copy-res.js -w", - "start:js": "webpack-dev-server --output-filename=bundles/_dev_/[name].js -w --progress", + "start:js": "webpack-dev-server --output-filename=bundles/_dev_/[name].js --output-chunk-file=bundles/_dev_/[name].js -w --progress", "start:js:prod": "NODE_ENV=production webpack-dev-server -w --progress", "start": "node scripts/babelcheck.js && parallelshell \"npm run start:res\" \"npm run start:js\"", "start:prod": "parallelshell \"npm run start:res\" \"npm run start:js:prod\"",