How to deploy Angular 2 application developed in Typescript to production?

前端 未结 6 716
情深已故
情深已故 2020-12-05 01:47

I am new to Angular 2. I am confused with how Angular 2 works in production environment.

  1. What are the prerequisites for running Angular 2 application in pr

6条回答
  •  暖寄归人
    2020-12-05 02:52

    All typescript files will be transpiled to js files while developing the application by the transpiler so you don't need ts files in production.

    Also when you are done with the development , all you need to do is to make the bundle of dist directory using some bundling tool like webpack-starter or angular2-seed.

    Then you deploy this bundle to your server.

    The above mentioned packages have good amount of information on how one can deploy their angular2 app to production.

    Hope this helps.

提交回复
热议问题