Skip to content

Commit

Permalink
fix: revert buffer is not defined in storybook changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralph committed Aug 5, 2024
1 parent 844641e commit a04618a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
15 changes: 9 additions & 6 deletions web-marketplace/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,15 @@ export default defineConfig(({ mode }) => {
define: isDev ? { global: {} } : { 'process.env': {} },
optimizeDeps: {
esbuildOptions: {
plugins: [
NodeGlobalsPolyfillPlugin.default({
buffer: true,
process: true,
}),
],
plugins:
mode === 'development'
? [
NodeGlobalsPolyfillPlugin.default({
buffer: true,
process: true,
}),
]
: undefined,
},
},
test: {
Expand Down
15 changes: 9 additions & 6 deletions web-storybook/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,15 @@ module.exports = {
'@mui/material/Unstable_Grid2',
],
esbuildOptions: {
plugins:[
NodeGlobalsPolyfillPlugin({
buffer: true,
process: true,
}),
]
plugins:
configType === 'DEVELOPMENT'
? [
NodeGlobalsPolyfillPlugin({
buffer: true,
process: true,
}),
]
: undefined,
},
},
});
Expand Down

0 comments on commit a04618a

Please sign in to comment.