Logo

0x5a.live

for different kinds of informations and explorations.

GitHub - xsip/ngx-ssr-code-remover: Post processor to remove SSR Code from bundles when served

Post processor to remove SSR Code from bundles when served - xsip/ngx-ssr-code-remover

Visit SiteGitHub - xsip/ngx-ssr-code-remover: Post processor to remove SSR Code from bundles when served

GitHub - xsip/ngx-ssr-code-remover: Post processor to remove SSR Code from bundles when served

Post processor to remove SSR Code from bundles when served - xsip/ngx-ssr-code-remover

Powered by 0x5a.live 💗

ngx-ssr-code-remover

ngx-ssr-remover will post-process your angular bundle in your express server and serve bundles with ssr code removed alt text

Setup

npm i [email protected]:xsip/ngx-ssr-code-remover.git

Your express server should contain the following to lines.

...
import {removeSsrCodeV2} from "ngx-ssr-remover";


  server.set('view engine', 'html');
  server.set('views', browserDistFolder);

  // add those two lines to your express server
  removeSsrCodeV2.removeServerCode(browserDistFolder);
  removeSsrCodeV2.serveJsFromNoSsr(server,browserDistFolder);


  server.get('**', express.static(browserDistFolder, {
    maxAge: '1y',
    index: 'index.html',
  }));

...

To Automatically remove functions using the post-processor, decorate your component functions:

...
import {RemoveOnServe} from "ngx-ssr-remover/dist/decorator";


  @RemoveOnServe()
  test() {
    console.log('HI');
  }



Feel free to write tickets when you encounter some issue.

Angular Resources

are all listed below.

Resources

listed to get explored on!!

Made with ❤️

to provide different kinds of informations and resources.