ng serve doesn't generate dist folder anymore with new angular-cli webpack beta

前端 未结 4 1397
情话喂你
情话喂你 2021-01-04 01:15

I initially started a project with beta 10 of the angular-cli, when I run ng serve at that point of time the dist folder would contain the compiled

相关标签:
4条回答
  • 2021-01-04 01:50

    In the root folder of your angular2 project, run:

    ng build
    

    Or for production:

    ng build --prod
    

    This command will generate the dist folder.

    0 讨论(0)
  • 2021-01-04 01:55

    Just use ng build --watch. It will be rebuilding the project on changes.

    0 讨论(0)
  • 2021-01-04 01:55

    In the root folder of your project run

    ng serve --delete-output-path=false
    

    or

    ng serve --no-delete-output-path
    

    This worked for me.

    0 讨论(0)
  • 2021-01-04 01:59

    The new angular-cli version with webpack will generate dist folder only after ng build.

    ng serve works only in-memory now.

    0 讨论(0)
提交回复
热议问题