fix(storybook): fix broken Storybook stories during development (#29587)

Signed-off-by: hainenber <dotronghai96@gmail.com>
This commit is contained in:
Đỗ Trọng Hải
2024-07-15 22:34:38 +07:00
committed by GitHub
parent fb15278f97
commit 462cda400b
6 changed files with 10 additions and 4 deletions

View File

@@ -75,6 +75,7 @@ if (!isDevMode) {
const plugins = [
new webpack.ProvidePlugin({
process: 'process/browser.js',
...(isDevMode ? { Buffer: ['buffer', 'Buffer'] } : {}), // Fix legacy-plugin-chart-paired-t-test broken Story
}),
// creates a manifest.json mapping of name to hashed output used in template files
@@ -336,6 +337,7 @@ const config = {
fs: false,
vm: require.resolve('vm-browserify'),
path: false,
...(isDevMode ? { buffer: require.resolve('buffer/') } : {}), // Fix legacy-plugin-chart-paired-t-test broken Story
},
},
context: APP_DIR, // to automatically find tsconfig.json