Vietnamisation_AI và lập trình mã đang tăng cường: Greptile cho biết mỗi lập trình viên viết trung bình 7,839 dòng code/năm 2025 (+76% so 2024), độ dài Pull Request tăng 33% (57→76 dòng). Đội nhóm 6-15 người nâng hiệu suất gấp đôi. Xu hướng code "mật độ cao" đang lên. #AI #LậpTrình #PhátTriểnPhầnMềm #StateOfAICoding #Greptile
*(500/500 characters)*
![A screenshot of a GitHub comment by a greptile bot reading:
"To resolve the _interopRequireDefault2 is not a function error when using Material UI with Storybook and Vite, follow these steps:
Update Vite Configuration: Ensure your Vite configuration properly handles CommonJS modules. Update your vite.config.js to include the vite-plugin-commonjs plugin.
import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import commonjs from 'vite-plugin-commonjs'; export default defineConfig({ plugins: [react(), commonjs()] });
Update Storybook Configuration: Ensure your Storybook configuration is set up to use Vite. Update your .storybook/main.js to include the @storybook/react-vite framework.
module.exports = { framework: '@storybook/react-vite', stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'], addons: [ '@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-interactions', ], };
Install Dependencies: Ensure you have the necessary dependencies installed.
npm install vite-plugin-commonjs @storybook/react-vite
These steps should help resolve the issue with Material UI components in Storybook using Vite.
References
/code/lib/blocks/src/examples/Button.stories.tsx
/code/renderers/web-components/template/cli/ts-4-9/Button.stories.ts
/docs/get-started/frameworks/react-vite.mdx
About Greptile"
It is downvoted once.](https://files.mastodon.social/cache/media_attachments/files/112/768/899/236/468/667/small/6357e2db67631521.png)