mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-20 05:02:37 +08:00
you also need const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); in main.js. Obvious, perhaps, but it could save someone a step if they miss it (like I did :-) )
18 lines
354 B
Plaintext
18 lines
354 B
Plaintext
```js
|
|
// .storybook/main.js
|
|
|
|
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
|
|
|
module.exports = {
|
|
webpackFinal: async (config) => {
|
|
config.resolve.plugins = [
|
|
...(config.resolve.plugins || []),
|
|
new TsconfigPathsPlugin({
|
|
extensions: config.resolve.extensions,
|
|
}),
|
|
];
|
|
return config;
|
|
},
|
|
};
|
|
```
|