|
@@ -49,16 +49,21 @@ module.exports = ({ config }) => {
|
49
|
49
|
config.module.rules.push({
|
50
|
50
|
test: /\.(ts|tsx)$/,
|
51
|
51
|
use: [
|
|
52
|
+ // Optional
|
|
53
|
+ {
|
|
54
|
+ loader: require.resolve("react-docgen-typescript-loader"),
|
|
55
|
+ options: {
|
|
56
|
+ // Provide the path to your tsconfig.json so that your stories can
|
|
57
|
+ // display types from outside each individual story.
|
|
58
|
+ tsconfigPath: path.resolve(__dirname, "../tsconfig.json"),
|
|
59
|
+ },
|
|
60
|
+ },
|
52
|
61
|
{
|
53
|
62
|
loader: require.resolve('babel-loader'),
|
54
|
63
|
options: {
|
55
|
64
|
presets: [['react-app', { flow: false, typescript: true }]],
|
56
|
65
|
}
|
57
|
66
|
},
|
58
|
|
- // Optional
|
59
|
|
- {
|
60
|
|
- loader: require.resolve("react-docgen-typescript-loader")
|
61
|
|
- },
|
62
|
67
|
]
|
63
|
68
|
});
|
64
|
69
|
config.resolve.extensions.push(".ts", ".tsx");
|