Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

Commit dd5a711

Browse files
committed
refactor: update storybook config
1 parent e997ce3 commit dd5a711

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.storybook/webpack.config.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
const path = require("path")
2-
const genDefaultConfig = require("@storybook/react/dist/server/config/defaults/webpack.config.js")
32

4-
module.exports = (config, env) => {
5-
const myConfig = genDefaultConfig(config, env)
3+
module.exports = async ({ config }) => {
4+
//const myConfig = genDefaultConfig(config, env)
65

7-
myConfig.module.rules.push({
6+
config.module.rules.push({
87
test: /\.tsx?$/,
98
loader: "ts-loader",
109
exclude: /node_modules/,
1110
include: [path.resolve(__dirname, "..", "src"), path.resolve(__dirname, "views")],
1211
})
1312

14-
myConfig.resolve.extensions.unshift(".tsx")
15-
myConfig.resolve.extensions.unshift(".ts")
13+
config.resolve.extensions.unshift(".tsx")
14+
config.resolve.extensions.unshift(".ts")
1615

17-
return myConfig
16+
return config
1817
}

0 commit comments

Comments
 (0)