Skip to content

Instantly share code, notes, and snippets.

@helderberto
Created February 8, 2022 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save helderberto/cb3a5c7f133969de08e5897d1511a2c0 to your computer and use it in GitHub Desktop.
Save helderberto/cb3a5c7f133969de08e5897d1511a2c0 to your computer and use it in GitHub Desktop.
Storybook Preview (NextJS) - Fix Link
module.exports = {
staticDirs: ['../public'],
stories: ['../src/components/**/stories.tsx'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'storybook-addon-next-router',
{
/**
* NOTE: fix Storybook issue with PostCSS@8
* @see https://github.com/storybookjs/storybook/issues/12668#issuecomment-773958085
*/
name: '@storybook/addon-postcss',
options: {
postcssLoaderOptions: {
implementation: require('postcss')
}
}
}
],
framework: '@storybook/react',
core: {
builder: 'webpack5'
},
webpackFinal: (config) => {
config.resolve.modules.push(`${process.cwd()}/src`)
return config
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment