mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
27 lines
858 B
JavaScript
27 lines
858 B
JavaScript
const path = require('path');
|
|
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
|
const { NormalModuleReplacementPlugin } = require('webpack');
|
|
|
|
module.exports = {
|
|
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
|
|
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
|
|
webpackFinal: async (config, { configType }) => {
|
|
config.resolve.plugins = [
|
|
new TsconfigPathsPlugin({
|
|
configFile: path.resolve(__dirname, '../tsconfig.json'),
|
|
}),
|
|
];
|
|
|
|
config.resolve.alias['next/link'] = path.resolve(
|
|
__dirname,
|
|
'mocks/next_link.tsx'
|
|
);
|
|
|
|
return config;
|
|
},
|
|
typescript: {
|
|
checkOptions: {
|
|
tsconfig: path.resolve(__dirname, '../tsconfig.stories.json'),
|
|
},
|
|
},
|
|
};
|