We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 326d29d commit 4804900Copy full SHA for 4804900
web_src/js/markup/asciicast.js
@@ -2,7 +2,10 @@ export async function renderAsciinemaPlayer() {
2
const els = document.querySelectorAll('.asciinema-player-container');
3
if (!els.length) return;
4
5
- const player = await import(/* webpackChunkName: "asciinema-player" */'asciinema-player');
+ 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
+ ]);
9
10
for (const el of els) {
11
player.create(el.getAttribute('data-asciinema-player-src'), el, {
web_src/less/markup/asciicast.less
@@ -1,5 +1,3 @@
1
-@import "../asciinema-player/dist/bundle/asciinema-player.css";
-
.asciinema-player-container {
width: 100%;
height: auto;
0 commit comments