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

Add Storybook webpack config for wasm files

GitOrigin-RevId: a5e0e3b6af7865c3f8285c9b7bef8a4efae3a55b
This commit is contained in:
ilkin-overleaf 2024-10-08 17:35:02 +03:00 committed by Copybot
parent 92eade7502
commit 874c0211d7

View file

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