Skip to content

Instantly share code, notes, and snippets.

@davideast
Last active August 10, 2017 17:17
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 davideast/d4b77f3e47bf847c455f7144bef357d9 to your computer and use it in GitHub Desktop.
Save davideast/d4b77f3e47bf847c455f7144bef357d9 to your computer and use it in GitHub Desktop.
Angular Universal + TS server build
# Build the browser bundle
ng build --prod
# Build the universal bundle
ng build --prod --app 1
# Move the browser index.html to generate the SSR version
mv dist/index.html dist-server/
# Treat dist as static within dist-server
mv dist/ dist-server/static
# Transpile TS server code
node_modules/.bin/tsc -p server/tsconfig.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment