mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 06:53:10 +02:00
build(#10336): use unpkg for storybook twemojis
This commit is contained in:
parent
3f4d93a287
commit
edeabac8f7
1 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ export const onUnhandledRequest = ((req, print) => {
|
|||
export const commonHandlers = [
|
||||
rest.get('/twemoji/:codepoints.svg', async (req, res, ctx) => {
|
||||
const { codepoints } = req.params;
|
||||
const file = await import(`../node_modules/@discordapp/twemoji/dist/svg/${codepoints}.svg?raw`);
|
||||
return res(ctx.set('Content-Type', 'image/svg+xml'), ctx.body(file.default));
|
||||
const value = await fetch(`https://unpkg.com/@discordapp/twemoji@14.1.2/dist/svg/${codepoints}.svg`).then((response) => response.blob());
|
||||
return res(ctx.set('Content-Type', 'image/svg+xml'), ctx.body(value));
|
||||
}),
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue