storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.68k stars 9.32k forks source link

Only use `tsconfig-paths-webpack-plugin` instead of also using `tsconfig-paths` in `@storybook/nextjs` #29188

Open JReinhold opened 1 month ago

JReinhold commented 1 month ago

In @storybook/nextjs we both directly depend on tsconfig-paths and the wrapper tsconfig-paths-webpack-plugin:

https://github.com/storybookjs/storybook/blob/b23e84ad3ac8523d8f2372157cd6e5ddab9312b1/code/frameworks/nextjs/src/imports/webpack.ts#L1-L28

This seems unnecessary. We should be able to just use the webpack plugin directly. If it fails to load when the project isn't a TS project, wrap it in a try/catch block.