From edeabac8f7d43dbe6c3753d960803ba53934fd03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Sat, 1 Apr 2023 23:04:08 +0900 Subject: [PATCH] build(#10336): use unpkg for storybook twemojis --- packages/frontend/.storybook/mocks.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/.storybook/mocks.ts b/packages/frontend/.storybook/mocks.ts index db9222f0dd..41c3c5c4d9 100644 --- a/packages/frontend/.storybook/mocks.ts +++ b/packages/frontend/.storybook/mocks.ts @@ -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)); }), ];