text: const path = require('path');
  const toPath = (_path) => path.join(process.cwd(), _path);
  
  module.exports = {
    stories: ['../stories/**/*.stories.tsx'],
    addons: [
      'storybook-addon-designs',
      '@storybook/addon-links',
      '@storybook/addon-essentials',
    ],
    webpackFinal: async (config) => {
      // Copied from Chakra UI repo to make Chakra work correctly in Storybook
      // https://github.com/chakra-ui/chakra-ui/blob/e2a6237170a7c6b308235d81ebbf66786d01616d/.storybook/main.js#L11
      return {
        ...config,
        resolve: {
          ...config.resolve,
          alias: {
            ...config.resolve.alias,
            '@emotion/core': toPath('node_modules/@emotion/react'),
            'emotion-theming': toPath('node_modules/@emotion/react'),
          },
        },
      };
    },
  };
  