Skip to content

Commit 1b4a9c4

Browse files
committed
設定を元に戻す
1 parent ae5d8f9 commit 1b4a9c4

File tree

2 files changed

+25
-29
lines changed

2 files changed

+25
-29
lines changed

.storybook/main.js

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const { resolve } = require('path')
2-
32
module.exports = {
43
stories: [
54
'../stories/pages/admin/ListSites.stories.tsx',
@@ -8,19 +7,19 @@ module.exports = {
87
'../stories/**/*.stories.@(ts|tsx|js|jsx)'
98
],
109
core: {
11-
builder: 'webpack5'
10+
builder: "webpack5"
1211
},
1312
addons: [
1413
'@storybook/addon-links',
1514
'@storybook/addon-essentials',
1615
'storybook-addon-root-attribute/register',
1716
],
17+
// https://storybook.js.org/docs/react/configure/typescript#mainjs-configuration
1818
typescript: {
19-
check: false,
20-
reactDocgen: 'react-docgen-typescript',
19+
check: true, // type-check stories during Storybook build
20+
reactDocgen: 'none',
2121
},
2222
webpackFinal: async(config) => {
23-
// SASS の設定
2423
config.module.rules.push({
2524
test: /\.scss$/,
2625
use: [
@@ -38,11 +37,7 @@ module.exports = {
3837
},
3938
],
4039
include: resolve(__dirname, '../'),
41-
});
42-
43-
// TypeScript の解決を設定
44-
config.resolve.extensions.push('.ts', '.tsx');
45-
46-
return config;
40+
})
41+
return config
4742
}
4843
};

tsdx.config.js

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,23 @@ const scss = require('rollup-plugin-scss')
55

66
module.exports = {
77
rollup(config, options) {
8-
return {
9-
...config,
10-
plugins: [
11-
...config.plugins,
12-
image(),
13-
css(),
14-
copy({
15-
assets: [
16-
"src/assets"
17-
]
18-
}),
19-
scss({
20-
output: 'dist/css/styles.css',
21-
sass: require('sass')
22-
})
23-
]
24-
};
8+
config.plugins.unshift(image());
9+
config.plugins.push(css())
10+
config.plugins.push(
11+
copy({
12+
assets: [
13+
// You can include directories
14+
"src/assets"
15+
],
16+
})
17+
)
18+
config.plugins.push(
19+
scss({
20+
output: 'dist/css/styles.css',
21+
sass: require('sass')
22+
})
23+
)
24+
return config;
25+
2526
}
26-
};
27+
}

0 commit comments

Comments
 (0)