Skip to content

Commit

Permalink
設定を元に戻す
Browse files Browse the repository at this point in the history
  • Loading branch information
yotigory committed Nov 14, 2024
1 parent ae5d8f9 commit 1b4a9c4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 29 deletions.
17 changes: 6 additions & 11 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { resolve } = require('path')

module.exports = {
stories: [
'../stories/pages/admin/ListSites.stories.tsx',
Expand All @@ -8,19 +7,19 @@ module.exports = {
'../stories/**/*.stories.@(ts|tsx|js|jsx)'
],
core: {
builder: 'webpack5'
builder: "webpack5"
},
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'storybook-addon-root-attribute/register',
],
// https://storybook.js.org/docs/react/configure/typescript#mainjs-configuration
typescript: {
check: false,
reactDocgen: 'react-docgen-typescript',
check: true, // type-check stories during Storybook build
reactDocgen: 'none',
},
webpackFinal: async(config) => {
// SASS の設定
config.module.rules.push({
test: /\.scss$/,
use: [
Expand All @@ -38,11 +37,7 @@ module.exports = {
},
],
include: resolve(__dirname, '../'),
});

// TypeScript の解決を設定
config.resolve.extensions.push('.ts', '.tsx');

return config;
})
return config
}
};
37 changes: 19 additions & 18 deletions tsdx.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,23 @@ const scss = require('rollup-plugin-scss')

module.exports = {
rollup(config, options) {
return {
...config,
plugins: [
...config.plugins,
image(),
css(),
copy({
assets: [
"src/assets"
]
}),
scss({
output: 'dist/css/styles.css',
sass: require('sass')
})
]
};
config.plugins.unshift(image());
config.plugins.push(css())
config.plugins.push(
copy({
assets: [
// You can include directories
"src/assets"
],
})
)
config.plugins.push(
scss({
output: 'dist/css/styles.css',
sass: require('sass')
})
)
return config;

}
};
}

0 comments on commit 1b4a9c4

Please sign in to comment.