diff --git a/.storybook/main.js b/.storybook/main.js index cd74759..18bee9b 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -1,3 +1,6 @@ +const path = require('path') +const toPath = _path => path.join(process.cwd(), _path) + module.exports = { "stories": [ "../src/**/*.stories.mdx", @@ -7,5 +10,18 @@ module.exports = { "@storybook/addon-links", "@storybook/addon-essentials", "@storybook/preset-create-react-app" - ] + ], + // From https://github.com/storybookjs/storybook/issues/7540 + webpackFinal: async config => { + return { + ...config, + resolve: { + ...config.resolve, + alias: { + ...config.resolve.alias, + '@emotion/styled': toPath('node_modules/@emotion/styled'), + }, + }, + } + }, } \ No newline at end of file