1

Normally using JIT compiler I am able to build my distribution and serve it on production with a simple Nginx configuration:

server {
   listen       8082;
   server_name  127.0.0.1;
   root /path/to/my/dist;

   location / {
       try_files $uri$args $uri$args/ /index.html;
   }
}

But now I am trying to configure Nginx to serve an AOT compiled version following this configuration. The AOT compiled files are located in the /aot directory, which contains the folders node_modules, src and all the ngFactory.ts files generated.

My question is, how can this app be served by Nginx? Usually when I create bundles with Webpack I just need to serve the index.html, polyfills, app, vendor and the assets, but here looks like I have the whole project structure.

Community
  • 1
  • 1
Ander
  • 5,093
  • 7
  • 41
  • 70

0 Answers0