Skip to content

Instantly share code, notes, and snippets.

@cyrilletuzi
Last active August 1, 2017 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cyrilletuzi/324622c0242a7d5e02e0b6051d11396c to your computer and use it in GitHub Desktop.
Save cyrilletuzi/324622c0242a7d5e02e0b6051d11396c to your computer and use it in GitHub Desktop.
{
"apps": [
{
/* Keep your actual config here */
},
/* Add this second config */
{
/* Give it a name for easier use */
"name": "universal",
/* Tell the CLI to package for the server */
"platform": "server",
"root": "src",
/* Change the output directory to not mix with browser files, and add it to your .gitignore */
"outDir": "dist-server",
/* Server will use a different entry point */
"main": "main-server.ts",
/* Server will use a different TypeScript config */
"tsconfig": "tsconfig.server.json",
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
/* Delete polyfills, the server does not need them */
/* Other properties like assets, styles, scripts... can be removed,
* they are already generated for the browser, so build will be faster */
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment