Some questions to put angular2 web project to production environment
- We do development on lite server but what is best for production? Is is some other server module of
nodejs
? Technically we can have any server (apache, tomcat, etc). - How should we do source code management for below context.
- browser must include
js
files so project should have js files when deployed - In standard java project we just commit
.java
files and uses jenkins (may be other tools) to compile and make the deploy-able structure - Should we follow same strategy here? i.e. don't commit compiled js files and deploy using some
node
compiler which takests
files and compiles it to js
- browser must include
- What is the best way to minify/obfuscate the js files
- I know a way using
outDir
andoutFile
withgrump
but I don't want every files tobe included in one minified file because it kills the concept of lazy loading - Is there a way to minify and obfuscate js files on compile time only?
- I know a way using
- What
enableProdMode()
do? How it is different than not using it?