Skip to content

Instantly share code, notes, and snippets.

@winkerVSbecks
Created June 7, 2022 17:58
Show Gist options
  • Save winkerVSbecks/c09483b0653e748ca346f5528f3bb9f1 to your computer and use it in GitHub Desktop.
Save winkerVSbecks/c09483b0653e748ca346f5528f3bb9f1 to your computer and use it in GitHub Desktop.
// .storybook/main.js
module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
core: {
builder: 'webpack5',
},
webpackFinal: async (config) => {
// Mock modules
config.resolve.alias['./Applause'] = require.resolve(
'../src/__mocks__/Applause.mock.js'
);
config.resolve.alias['./useMailingListForm'] = require.resolve(
'../src/__mocks__/useMailingListForm.mock.js'
);
return config;
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment