function generateHostingConfig()

in src/schematics/setup/static.ts [17:42]


function generateHostingConfig(project: string, dist: string) {
  return {
    target: project,
    public: dist,
    ignore: ['**/.*'],
    headers: [{
      source: '*.[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].+(css|js)',
      headers: [{
        key: 'Cache-Control',
        value: 'public,max-age=31536000,immutable',
      }],
    }, {
      source: '/@(ngsw-worker.js|ngsw.json)',
      headers: [{
        key: 'Cache-Control',
        value: 'no-cache',
      }],
    }],
    rewrites: [
      {
        source: '**',
        destination: '/index.html',
      }
    ]
  };
}