File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,17 +123,10 @@ export async function loadSkin() {
123123 // the SDK until we have to in imports.
124124 console . log ( "Loading skin..." ) ;
125125 // load these async so that its code is not executed immediately and we can catch any exceptions
126- const [ sdk , skin ] = await Promise . all ( [
127- import (
128- /* webpackChunkName: "matrix-react-sdk" */
129- /* webpackPreload: true */
130- "matrix-react-sdk" ) ,
131- import (
132- /* webpackChunkName: "riot-web-component-index" */
133- /* webpackPreload: true */
134- // @ts -ignore - this module is generated so may fail lint
135- "../component-index" ) ,
136- ] ) ;
126+ const { sdk, skin} = await import (
127+ /* webpackChunkName: "skin" */
128+ /* webpackPreload: true */
129+ "./skin" ) ;
137130 sdk . loadSkin ( skin ) ;
138131 console . log ( "Skin loaded!" ) ;
139132}
Original file line number Diff line number Diff line change 1+ /*
2+ Copyright 2020 New Vector Ltd
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+ */
16+
17+ import * as sdk from "matrix-react-sdk" ;
18+ // @ts -ignore - this module is generated so may fail lint
19+ import * as skin from "../component-index" ;
20+
21+ // we re-export here so that we can async-load this one file and webpack will bundle them together.
22+ export { sdk , skin } ;
You can’t perform that action at this time.
0 commit comments