angular.js - Problem with deploying code into production environment after angular development
習慣沉默
習慣沉默 2017-05-16 13:20:24
0
4
689

Our front-end is developed with angular2. After compiling webpack and packaging, how is the production environment handled?
Is it enough to just put the packaged js and html files on the server? Do I need to install a front-end server in the production environment? How to deal with the angular dependencies and other dependencies such as webpack used in our development?

習慣沉默
習慣沉默

reply all(4)
淡淡烟草味

After building, just throw the dist directory to the server, nginx will forward it and it’s done

Ty80

Static resources such as js, html, and image styles are required. node_modules need to be placed in the js and html folders or their outer layers. Webpack dependencies are not required

仅有的幸福

Package and build directly with the appropriate webpack plug-in. Considering the optimization of the project, you can use lazy loading, AOT, etc. For development, it is best to install webpack-dev-server for easy debugging. You can check out my starter when you have time

为情所困

After packaging, just put it directly on the server. Everything you depend on is included in the package

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template