From a2f8b4729eb3d7150a47bbf0b909397c802cafc5 Mon Sep 17 00:00:00 2001 From: PieterGit Date: Wed, 8 Aug 2018 01:17:53 +0200 Subject: [PATCH] xdrip-js.js uses ES6 syntax for `let` and webpack@3 does not like that see https://github.com/barbar/vortigern/issues/139 --- lib/plugins/xdrip-js.js | 4 ++-- package.json | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/plugins/xdrip-js.js b/lib/plugins/xdrip-js.js index 85109b1ba1a..677d2b42674 100644 --- a/lib/plugins/xdrip-js.js +++ b/lib/plugins/xdrip-js.js @@ -234,8 +234,8 @@ function init(ctx) { // session start is only valid if in a session if (sensor && sensor.lastSessionStart && (sensor.lastState != 0x1)) { - let diffTime = moment().diff(moment(sensor.lastSessionStart)); - let duration = moment.duration(diffTime); + var diffTime = moment().diff(moment(sensor.lastSessionStart)); + var duration = moment.duration(diffTime); sessionDuration = duration.days() + ' days ' + duration.hours() + ' hours'; diff --git a/package.json b/package.json index 10f344ba46c..86f4872b6d1 100644 --- a/package.json +++ b/package.json @@ -27,10 +27,10 @@ "start": "node server.js", "test": "make test", "env": "env", - "postinstall": "webpack --mode production --config webpack.config.js && npm run-script update-buster", - "bundle": "webpack --mode production --config webpack.config.js && npm run-script update-buster", - "bundle-dev": "webpack --mode development --config webpack.config.js && npm run-script update-buster", - "bundle-analyzer": "webpack --mode development --config webpack.config.js --profile --json > stats.json && webpack-bundle-analyzer stats.json", + "postinstall": "webpack --config webpack.config.js && npm run-script update-buster", + "bundle": "webpack --config webpack.config.js && npm run-script update-buster", + "bundle-dev": "webpack --config webpack.config.js && npm run-script update-buster", + "bundle-analyzer": "webpack --config webpack.config.js --profile --json > stats.json && webpack-bundle-analyzer stats.json", "update-buster": "node bin/generateCacheBuster.js >tmp/cacheBusterToken" }, "config": {