angular2-build

Angular2-cli not considered app folder files and some other files in dist folder.

给你一囗甜甜゛ 提交于 2020-01-06 18:03:57
问题 I have used below steps to generate dist in production npm install -g angular2-cli ng new PROJECT_NAME cd PROJECT_NAME After this I have copied all the code it included app folder ng serve it will open my project and runs successfully. ng build --prod Now it is building everything and creating dist folder also, but incomplete. There is no app folder or required files. Please suggest me the method to generate angular 2 build. I want to host this build in any web server. 回答1: app folder only

How to build angular 2 app without cli

元气小坏坏 提交于 2020-01-01 05:47:33
问题 I am new in angular 2, I want to know how to build my angular 2 app without using CLI for production. Thanks in Advance. 回答1: If you have used CLI for your existing application You can migrate from Angular CLI to Webpack and tweak it accordingly for (local, development, production). Since Angular CLI v1.0 there’s the “eject” feature, that allows you to extract the webpack config file and manipulate it as you wish. Run ng eject so Angular CLI generates the webpack.config.js file. Run npm