Skip to content

Commit

Permalink
Use storybook-vite (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
wwahammy authored Oct 7, 2023
2 parents 0be516b + d646415 commit d2c88cd
Show file tree
Hide file tree
Showing 3 changed files with 468 additions and 1,356 deletions.
17 changes: 1 addition & 16 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
module.exports = {
features: {
postcss: false
},

stories: ['../src/**/*.stories.[tj]s?(x)'],
addons: ['@storybook/addon-actions', '@storybook/addon-links'],

webpackFinal: async config => {
// do mutation to the config
config.module.rules.push({
test: /\.(ts|tsx)?$/,
exclude: [/node_modules/],
loader: 'ts-loader'
});
config.resolve.extensions.push('.ts');
config.resolve.extensions.push('.tsx');
return config;
},

framework: {
name: '@storybook/react-webpack5',
name: '@storybook/react-vite',
options: {}
},

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@storybook/addon-links": "^7.4.6",
"@storybook/addons": "^7.4.6",
"@storybook/react": "^7.4.6",
"@storybook/react-webpack5": "^7.4.6",
"@storybook/react-vite": "^7.4.6",
"@testing-library/dom": "^9",
"@testing-library/jest-dom": "^5",
"@testing-library/react": "^14",
Expand Down Expand Up @@ -65,6 +65,7 @@
"ts-jest": "^29",
"ts-loader": "^8",
"typescript": "^5.0.4",
"vite": "^4.4.11",
"webpack": "^5.73.0",
"webpack-cli": "^5.1.4"
},
Expand Down
Loading

0 comments on commit d2c88cd

Please sign in to comment.