Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add server-side prerendering #169

Open
jelbourn opened this issue Jun 7, 2017 · 6 comments
Open

Add server-side prerendering #169

jelbourn opened this issue Jun 7, 2017 · 6 comments

Comments

@jelbourn
Copy link
Member

jelbourn commented Jun 7, 2017

  • When dealing with multiple versions of docs, we likely only want to support prerendering the latest/ version.
  • Will likely be implemented with firebase dynamic hosting
@amcdnl
Copy link
Contributor

amcdnl commented Jul 15, 2017

I attempted to add app-shell rendering for PWA enhancement using ngu-app-shell, however encountered errors when trying to build.

> ngu-app-shell --module src/app/app-module.ts --out dist/index-shell.html

Unhandled Promise rejection: ENOENT: no such file or directory, open 'footer.html' ; Zone: <root> ; Task: Promise.then ; Value: { Error: ENOENT: no such file or directory, open 'footer.html'
    at Object.fs.openSync (fs.js:558:18)
    at Object.fs.readFileSync (fs.js:468:33)
    at /Users/dev/material.angular.io/node_modules/ng-pwa-tools/lib/common/ng.js:24:24
    at new ZoneAwarePromise (/Users/dev/material.angular.io/node_modules/zone.js/dist/zone-node.js:834:29)
    at FileLoader.get (/Users/dev/material.angular.io/node_modules/ng-pwa-tools/lib/common/ng.js:23:16)
    at DirectiveNormalizer._fetch (/Users/dev/material.angular.io/node_modules/@angular/compiler/bundles/compiler.umd.js:14095:43)
    at DirectiveNormalizer.normalizeTemplateOnly (/Users/dev/material.angular.io/node_modules/@angular/compiler/bundles/compiler.umd.js:14138:29)
    at DirectiveNormalizer.normalizeTemplate (/Users/dev/material.angular.io/node_modules/@angular/compiler/bundles/compiler.umd.js:14122:36)
    at CompileMetadataResolver.loadDirectiveMetadata (/Users/dev/material.angular.io/node_modules/@angular/compiler/@angular/compiler.es5.js:15121:44)
    at /Users/dev/material.angular.io/node_modules/@angular/compiler/@angular/compiler.es5.js:26692:66

@jelbourn
Copy link
Member Author

jelbourn commented Jul 17, 2017

The real problem blocking the use of platform-server here is our use of scss in styleUrls (which ngc cannot understand).

@amcdnl
Copy link
Contributor

amcdnl commented Jul 18, 2017

@jelbourn - So in the past, I've gotten around this by pre-compiling the css and copying the code to a temp dir and replacing scss to css. Would you be ok w/ an approach like that?

@jelbourn
Copy link
Member Author

Not sure it's worth it at the moment. I think we'd get more benefit from lazy loading, which is a harder problem.

@Splaktar Splaktar removed the blocked label Feb 1, 2020
@Splaktar
Copy link
Member

Splaktar commented Feb 1, 2020

There are more options for this today.

@Splaktar
Copy link
Member

Scully is another option for pre-rendering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants