Push connect chunks

This commit is contained in:
Ken-Håvard Lieng 2020-05-16 03:58:17 +02:00
parent 75c9560dfb
commit ed432881ef
3 changed files with 165 additions and 161 deletions

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,9 @@ import cn from 'classnames';
const Modals = lazy(() => import('components/modals')); const Modals = lazy(() => import('components/modals'));
const Chat = lazy(() => import('containers/Chat')); const Chat = lazy(() => import('containers/Chat'));
const Connect = lazy(() => import('containers/Connect')); const Connect = lazy(() =>
import(/* webpackChunkName: "connect" */ 'containers/Connect')
);
const Settings = lazy(() => import('containers/Settings')); const Settings = lazy(() => import('containers/Settings'));
const App = ({ const App = ({

View File

@ -95,7 +95,7 @@ func (d *Dispatch) initFileServer() {
indexStylesheet := "/" + findAssetName("main*.css") indexStylesheet := "/" + findAssetName("main*.css")
indexScripts := []string{ indexScripts := []string{
"/" + findAssetName("vendors*.js"), "/" + findAssetName("vendors~main*.js"),
"/" + findAssetName("main*.js"), "/" + findAssetName("main*.js"),
} }
@ -103,6 +103,8 @@ func (d *Dispatch) initFileServer() {
newH2PushAsset(indexStylesheet), newH2PushAsset(indexStylesheet),
newH2PushAsset(indexScripts[0]), newH2PushAsset(indexScripts[0]),
newH2PushAsset(indexScripts[1]), newH2PushAsset(indexScripts[1]),
newH2PushAsset("/" + findAssetName("vendors~connect*.js")),
newH2PushAsset("/" + findAssetName("connect*.js")),
} }
for _, asset := range h2PushAssets { for _, asset := range h2PushAssets {