상대경로 대신 @/* 로 사용하기 위해 tsconfig.json 파일에 아래와 같이 셋팅을 하고 작업중입니다.
"paths": {
"@/components/*": ["components/*"],
"@/pages/*": ["pages/*"],
"@/styles/*": ["styles/*"],
"@/utils/*": ["utils/*"]
}
const { TsconfigPathsPlugin } = require('tsconfig-paths-webpack-plugin');
module.exports = {
stories: ['../components/**/*.stories.mdx', '../components/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'storybook-addon-styled-component-theme/dist/preset',
],
webpackFinal: async (config) => {
[].push.apply(config.resolve.plugins, [
new TsconfigPathsPlugin({ extensions: config.resolve.extensions })
]);
return config;
}
};