File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,10 @@ export async function renderAsciinemaPlayer() {
2
2
const els = document . querySelectorAll ( '.asciinema-player-container' ) ;
3
3
if ( ! els . length ) return ;
4
4
5
- const player = await import ( /* webpackChunkName: "asciinema-player" */ 'asciinema-player' ) ;
5
+ const [ player ] = await Promise . all ( [
6
+ import ( /* webpackChunkName: "asciinema-player" */ 'asciinema-player' ) ,
7
+ import ( /* webpackChunkName: "asciinema-player" */ 'asciinema-player/dist/bundle/asciinema-player.css' ) ,
8
+ ] ) ;
6
9
7
10
for ( const el of els ) {
8
11
player . create ( el . getAttribute ( 'data-asciinema-player-src' ) , el , {
Original file line number Diff line number Diff line change 1
- @import " ../asciinema-player/dist/bundle/asciinema-player.css" ;
2
-
3
1
.asciinema-player-container {
4
2
width : 100% ;
5
3
height : auto ;
You can’t perform that action at this time.
0 commit comments