Adjust webpack chunk preloading strategy
This commit is contained in:
		
							parent
							
								
									db8ed5b705
								
							
						
					
					
						commit
						af7b9c0dc8
					
				@ -33,6 +33,7 @@ let routes: Routes = [
 | 
				
			|||||||
      {
 | 
					      {
 | 
				
			||||||
        path: '',
 | 
					        path: '',
 | 
				
			||||||
        loadChildren: () => import('./bitcoin-graphs.module').then(m => m.BitcoinGraphsModule),
 | 
					        loadChildren: () => import('./bitcoin-graphs.module').then(m => m.BitcoinGraphsModule),
 | 
				
			||||||
 | 
					        data: { preload: true },
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        path: '**',
 | 
					        path: '**',
 | 
				
			||||||
@ -52,6 +53,7 @@ let routes: Routes = [
 | 
				
			|||||||
        path: '',
 | 
					        path: '',
 | 
				
			||||||
        pathMatch: 'full',
 | 
					        pathMatch: 'full',
 | 
				
			||||||
        loadChildren: () => import('./bitcoin-graphs.module').then(m => m.BitcoinGraphsModule),
 | 
					        loadChildren: () => import('./bitcoin-graphs.module').then(m => m.BitcoinGraphsModule),
 | 
				
			||||||
 | 
					        data: { preload: true },
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        path: '',
 | 
					        path: '',
 | 
				
			||||||
@ -66,6 +68,7 @@ let routes: Routes = [
 | 
				
			|||||||
      {
 | 
					      {
 | 
				
			||||||
        path: '',
 | 
					        path: '',
 | 
				
			||||||
        loadChildren: () => import('./bitcoin-graphs.module').then(m => m.BitcoinGraphsModule),
 | 
					        loadChildren: () => import('./bitcoin-graphs.module').then(m => m.BitcoinGraphsModule),
 | 
				
			||||||
 | 
					        data: { preload: true },
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        path: '**',
 | 
					        path: '**',
 | 
				
			||||||
@ -77,6 +80,7 @@ let routes: Routes = [
 | 
				
			|||||||
    path: '',
 | 
					    path: '',
 | 
				
			||||||
    pathMatch: 'full',
 | 
					    pathMatch: 'full',
 | 
				
			||||||
    loadChildren: () => import('./bitcoin-graphs.module').then(m => m.BitcoinGraphsModule),
 | 
					    loadChildren: () => import('./bitcoin-graphs.module').then(m => m.BitcoinGraphsModule),
 | 
				
			||||||
 | 
					    data: { preload: true },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    path: '',
 | 
					    path: '',
 | 
				
			||||||
@ -128,6 +132,7 @@ let routes: Routes = [
 | 
				
			|||||||
  {
 | 
					  {
 | 
				
			||||||
    path: '',
 | 
					    path: '',
 | 
				
			||||||
    loadChildren: () => import('./bitcoin-graphs.module').then(m => m.BitcoinGraphsModule),
 | 
					    loadChildren: () => import('./bitcoin-graphs.module').then(m => m.BitcoinGraphsModule),
 | 
				
			||||||
 | 
					    data: { preload: true },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    path: '**',
 | 
					    path: '**',
 | 
				
			||||||
@ -151,10 +156,12 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
 | 
				
			|||||||
          path: '',
 | 
					          path: '',
 | 
				
			||||||
          pathMatch: 'full',
 | 
					          pathMatch: 'full',
 | 
				
			||||||
          loadChildren: () => import('./liquid/liquid-graphs.module').then(m => m.LiquidGraphsModule),
 | 
					          loadChildren: () => import('./liquid/liquid-graphs.module').then(m => m.LiquidGraphsModule),
 | 
				
			||||||
 | 
					          data: { preload: true },
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          path: '',
 | 
					          path: '',
 | 
				
			||||||
          loadChildren: () => import ('./liquid/liquid-master-page.module').then(m => m.LiquidMasterPageModule)
 | 
					          loadChildren: () => import ('./liquid/liquid-master-page.module').then(m => m.LiquidMasterPageModule),
 | 
				
			||||||
 | 
					          data: { preload: true },
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          path: 'status',
 | 
					          path: 'status',
 | 
				
			||||||
@ -164,6 +171,7 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
          path: '',
 | 
					          path: '',
 | 
				
			||||||
          loadChildren: () => import('./liquid/liquid-graphs.module').then(m => m.LiquidGraphsModule),
 | 
					          loadChildren: () => import('./liquid/liquid-graphs.module').then(m => m.LiquidGraphsModule),
 | 
				
			||||||
 | 
					          data: { preload: true },
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          path: '**',
 | 
					          path: '**',
 | 
				
			||||||
@ -175,10 +183,12 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
 | 
				
			|||||||
      path: '',
 | 
					      path: '',
 | 
				
			||||||
      pathMatch: 'full',
 | 
					      pathMatch: 'full',
 | 
				
			||||||
      loadChildren: () => import('./liquid/liquid-graphs.module').then(m => m.LiquidGraphsModule),
 | 
					      loadChildren: () => import('./liquid/liquid-graphs.module').then(m => m.LiquidGraphsModule),
 | 
				
			||||||
 | 
					      data: { preload: true },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      path: '',
 | 
					      path: '',
 | 
				
			||||||
      loadChildren: () => import ('./liquid/liquid-master-page.module').then(m => m.LiquidMasterPageModule)
 | 
					      loadChildren: () => import ('./liquid/liquid-master-page.module').then(m => m.LiquidMasterPageModule),
 | 
				
			||||||
 | 
					      data: { preload: true },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      path: 'preview',
 | 
					      path: 'preview',
 | 
				
			||||||
@ -201,6 +211,7 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
      path: '',
 | 
					      path: '',
 | 
				
			||||||
      loadChildren: () => import('./liquid/liquid-graphs.module').then(m => m.LiquidGraphsModule),
 | 
					      loadChildren: () => import('./liquid/liquid-graphs.module').then(m => m.LiquidGraphsModule),
 | 
				
			||||||
 | 
					      data: { preload: true },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      path: '**',
 | 
					      path: '**',
 | 
				
			||||||
 | 
				
			|||||||
@ -7,7 +7,8 @@ const routes: Routes = [
 | 
				
			|||||||
  {
 | 
					  {
 | 
				
			||||||
    path: '',
 | 
					    path: '',
 | 
				
			||||||
    component: MasterPageComponent,
 | 
					    component: MasterPageComponent,
 | 
				
			||||||
    loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule)
 | 
					    loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule),
 | 
				
			||||||
 | 
					    data: { preload: true },
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
];
 | 
					];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -95,8 +95,8 @@ const routes: Routes = [
 | 
				
			|||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            path: 'lightning',
 | 
					            path: 'lightning',
 | 
				
			||||||
            data: { networks: ['bitcoin'] },
 | 
					            data: { preload: true, networks: ['bitcoin'] },
 | 
				
			||||||
            loadChildren: () => import ('./lightning-graphs.module').then(m => m.LightningGraphsModule)
 | 
					            loadChildren: () => import ('./lightning-graphs.module').then(m => m.LightningGraphsModule),
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            path: '',
 | 
					            path: '',
 | 
				
			||||||
 | 
				
			|||||||
@ -7,7 +7,8 @@ const routes: Routes = [
 | 
				
			|||||||
  {
 | 
					  {
 | 
				
			||||||
    path: '',
 | 
					    path: '',
 | 
				
			||||||
    component: LiquidMasterPageComponent,
 | 
					    component: LiquidMasterPageComponent,
 | 
				
			||||||
    loadChildren: () => import('../graphs/graphs.module').then(m => m.GraphsModule)
 | 
					    loadChildren: () => import('../graphs/graphs.module').then(m => m.GraphsModule),
 | 
				
			||||||
 | 
					    data: { preload: true },
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
];
 | 
					];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -91,7 +91,8 @@ const routes: Routes = [
 | 
				
			|||||||
      },
 | 
					      },
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        path: 'docs',
 | 
					        path: 'docs',
 | 
				
			||||||
        loadChildren: () => import('../docs/docs.module').then(m => m.DocsModule)
 | 
					        loadChildren: () => import('../docs/docs.module').then(m => m.DocsModule),
 | 
				
			||||||
 | 
					        data: { preload: true },
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        path: 'api',
 | 
					        path: 'api',
 | 
				
			||||||
 | 
				
			|||||||
@ -31,7 +31,8 @@ const routes: Routes = [
 | 
				
			|||||||
      },
 | 
					      },
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        path: 'lightning',
 | 
					        path: 'lightning',
 | 
				
			||||||
        loadChildren: () => import('./lightning/lightning-previews.module').then(m => m.LightningPreviewsModule)
 | 
					        loadChildren: () => import('./lightning/lightning-previews.module').then(m => m.LightningPreviewsModule),
 | 
				
			||||||
 | 
					        data: { preload: true },
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user