emojisets: Prefetch the octopus via Webpack.

As of commit 1cdab5ae61 we use the
octopus image through Webpack, so the prefetch needs to be from the
same Webpack URL for it to do any good.  We don’t want to waste more
bandwidth on this [AWESOME CRITICAL FEATURE] than we have to.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-09-25 21:24:56 -07:00 committed by Tim Abbott
parent ade7cc4ef3
commit fa3ea59833
1 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,8 @@ import google_blob_sheet from "emoji-datasource-google-blob/img/google/sheets-25
import google_sheet from "emoji-datasource-google/img/google/sheets-256/64.png";
import twitter_sheet from "emoji-datasource-twitter/img/twitter/sheets-256/64.png";
import octopus_url from "../generated/emoji/images-google-64/1f419.png";
import google_blob_css from "!style-loader?injectType=lazyStyleTag!css-loader!../generated/emoji-styles/google-blob-sprite.css";
import google_css from "!style-loader?injectType=lazyStyleTag!css-loader!../generated/emoji-styles/google-sprite.css";
import twitter_css from "!style-loader?injectType=lazyStyleTag!css-loader!../generated/emoji-styles/twitter-sprite.css";
@ -45,5 +47,5 @@ export function initialize() {
//
// TODO: We should probably just make this work just like the Zulip emoji.
const octopus_image = new Image();
octopus_image.src = "/static/generated/emoji/images-google-64/1f419.png";
octopus_image.src = octopus_url;
}