How to build Angular 2 Universal for production

How can I build an Angular2 Universal project for production?

I'v installed the following starter application : https://github.com/angular/universal (2.x version not the 4.x)

I run in cmd the following command:

* `npm run build:prod:ngc` to compile the ngfactory files and build prod

but it dosen't create the dist folder and i think the building/compiling has been stopped too.

sh-3.2# npm run build:prod:ngc

> universal-starter@2.0.0 build:prod:ngc /PATH/omapp
> npm run clean:ngc && npm run ngc && npm run clean:dist && npm run build:prod

> universal-starter@2.0.0 clean:ngc /PATH/omapp
> rimraf **/*.ngfactory.ts **/*.css.shim.ts

> universal-starter@2.0.0 ngc /PATH/omapp
> ngc -p tsconfig.aot.json

> universal-starter@2.0.0 clean:dist /PATH/omapp
> rimraf dist

> universal-starter@2.0.0 build:prod /PATH/omapp
**> webpack --config webpack.prod.config.ts => STOPPED  HERE** (stay at this point after 5+ minutes)
链接地址: http://www.djcxy.com/p/31348.html

上一篇: 如何将角度4通用应用程序部署到Firebase

下一篇: 如何构建Angular 2 Universal以进行生产