Skip to content

Instantly share code, notes, and snippets.

@davideast
Last active Aug 10, 2017
Embed
What would you like to do?
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