Added dev build in Utils method - Unit Test in dev mode
MODIFY
build/webpack.dev.js
build/webpack.dev.js
@@ -2,6 +2,9 @@ const CircularDependencyPlugin = require('circular-dependency-plugin');
const config = {
mode: 'development',
+ optimization: {
+ nodeEnv: 'development-build'
+ },
module: {
rules: [
{

MODIFY
package.json
package.json
"config:rest": "ncp src/assets/configs-scp/e-Mobility-config/config_rest_server.json dist/assets/config.json",
"config:chargebox-json": "ncp src/assets/configs-scp/e-Mobility-config/config_chargebox_json_server.json dist/assets/config.json",
"config:chargebox-soap": "ncp src/assets/configs-scp/e-Mobility-config/config_chargebox_soap_server.json dist/assets/config.json",
- "start:dev": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=development node -r source-map-support/register dist/start.js",
+ "start:dev": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=development-build node -r source-map-support/register dist/start.js",
"start:dev:debug": "npm version && cross-env NODE_ENV=development ts-node-dev --inspect --files --max-old-space-size=4096 -- src/start.ts",
"start:dev:nodemon": "npm version && nodemon --exec 'ts-node --files' src/start.ts",
"start:dev:debug:nodemon": "npm version && nodemon --exec 'ts-node --files' src/start.ts 9229",
"start:dev:doctorprof": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=development clinic doctor -- node -r source-map-support/register dist/start.js",
"start:dev:flameprof": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=development clinic flame -- node -r source-map-support/register dist/start.js",
"start:dev:bubbleprof": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=development clinic bubbleprof -- node -r source-map-support/register dist/start.js",
- "start:devbuild": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=development node -r source-map-support/register dist/start.js",
"start:prod": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=production node -r source-map-support/register dist/start.js",
"start:prod:prof": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=production node -r source-map-support/register --prof dist/start.js",
"start:prod:doctorprof": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=production clinic doctor -- node -r source-map-support/register dist/start.js",

MODIFY
src/utils/Utils.ts
src/utils/Utils.ts
@@ -1227,7 +1227,7 @@ export default class Utils {
}
public static isDevelopmentEnv(): boolean {
- return process.env.NODE_ENV === 'development';
+ return process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'development-build';
}
public static isProductionEnv(): boolean {

Added dev build in Utils method - Unit Test in dev mode