From: Jérôme Benoit Date: Sat, 13 Feb 2021 22:53:23 +0000 (+0100) Subject: Add rollup bundling analysis to dev build. X-Git-Tag: v1.0.1-0~104^2~5 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=cb1948a3ff8766777ac895efe645618278ee5ff3;p=e-mobility-charging-stations-simulator.git Add rollup bundling analysis to dev build. Signed-off-by: Jérôme Benoit --- diff --git a/package-lock.json b/package-lock.json index 76bfedd8..c2084424 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8058,6 +8058,12 @@ "fsevents": "~2.3.1" } }, + "rollup-plugin-analyzer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-analyzer/-/rollup-plugin-analyzer-4.0.0.tgz", + "integrity": "sha512-LL9GEt3bkXp6Wa19SNR5MWcvHNMvuTFYg+eYBZN2OIFhSWN+pEJUQXEKu5BsOeABob3x9PDaLKW7w5iOJnsESQ==", + "dev": true + }, "rollup-plugin-copy": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/rollup-plugin-copy/-/rollup-plugin-copy-3.3.0.tgz", diff --git a/package.json b/package.json index b8ac08ad..dc329d53 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,8 @@ "start:bubbleprof": "cross-env NODE_ENV=production clinic bubbleprof -- node -r source-map-support/register dist/start.js", "rollup": "rollup --config", "build": "npm run rollup", - "build:dev": "npm run rollup -- --watch --environment BUILD:development", + "build:dev": "npm run rollup -- --environment BUILD:development", + "build:dev:watch": "npm run rollup -- --environment BUILD:development --watch", "build:mta": "mbt build", "lint": "cross-env TIMING=1 eslint --ext .js,.ts src", "lint:fix": "cross-env TIMING=1 eslint --fix --ext .js,.ts src", @@ -69,6 +70,7 @@ "mbt": "^1.1.0", "npm-check": "^5.9.2", "rollup": "^2.39.0", + "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-copy": "^3.3.0", "rollup-plugin-delete": "^2.0.0", "rollup-plugin-typescript2": "^0.29.0", diff --git a/rollup.config.js b/rollup.config.js index 37bc6799..16624fce 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,3 +1,4 @@ +import analyze from 'rollup-plugin-analyzer'; import copy from 'rollup-plugin-copy'; import del from 'rollup-plugin-delete'; import typescript from 'rollup-plugin-typescript2'; @@ -26,6 +27,7 @@ export default { targets: [ { src: 'src/assets', dest: 'dist/' } ] - }) + }), + isDevelopmentBuild && analyze() ] };