Przeglądaj źródła

Merge pull request #20926 from overleaf/ae-storybook-wasm

Add Storybook webpack config for wasm files

GitOrigin-RevId: a5e0e3b6af7865c3f8285c9b7bef8a4efae3a55b
ilkin-overleaf 2 lat temu
rodzic
commit
874c0211d7
1 zmienionych plików z 10 dodań i 0 usunięć
  1. 10 0
      services/web/.storybook/main.ts

+ 10 - 0
services/web/.storybook/main.ts

@@ -85,6 +85,16 @@ const config: StorybookConfig = {
           '@': path.join(rootDir, 'frontend/js/'),
         },
       },
+      module: {
+        ...storybookConfig.module,
+        rules: (storybookConfig.module?.rules ?? []).concat({
+          test: /\.wasm$/,
+          type: 'asset/resource',
+          generator: {
+            filename: 'js/[name]-[contenthash][ext]',
+          },
+        }),
+      },
     }
   },
 }