Error setting up ES6 production build angular 6 project with node, express

Multi tool use


Error setting up ES6 production build angular 6 project with node, express
I have been trying to setup angular project with node, express and es6 code. It works without ES6 syntax but I am having a problem setting up babel. The project was created using angular-cli.
I have installed babel-cli babel-preset-env package. Created .babelrc file for the same.
I need to figure out exactly what goes in scripts for production build.
package.json
{
"name": "alask",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "node server.js",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"postinstall": "ng build --aot --prod"
},
"private": true,
"dependencies": {
"@angular/animations": "^6.1.0",
"@angular/cli": "~6.1.1",
"@angular/common": "^6.1.0",
"@angular/compiler": "^6.1.0",
"@angular/compiler-cli": "^6.1.0",
"@angular/core": "^6.1.0",
"@angular/forms": "^6.1.0",
"@angular/http": "^6.1.0",
"@angular/platform-browser": "^6.1.0",
"@angular/platform-browser-dynamic": "^6.1.0",
"@angular/router": "^6.1.0",
"core-js": "^2.5.4",
"express": "^4.16.3",
"path": "^0.12.7",
"rxjs": "^6.0.0",
"typescript": "~2.7.2",
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.7.0",
"@angular/cli": "~6.1.1",
"@angular/compiler-cli": "^6.1.0",
"@angular/language-service": "^6.1.0",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"babel-cli": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1",
"codelyzer": "~4.2.1",
"enhanced-resolve": "^3.3.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.3.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typescript": "~2.7.2"
},
"engines": {
"node": "10.0.0",
"npm": "6.1.0"
}
}
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.