text: const path = require("path");
  const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
  
  module.exports = {
    stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
    addons: [
      "@storybook/addon-links",
      "@storybook/addon-essentials",
      "storybook-addon-designs",
    ],
    // Created by dwilhel1: https://github.com/storybookjs/storybook/issues/3291#issuecomment-686760728
    // Causes EXTREMELY slow build times...
    webpackFinal: async (config) => {
      if (config.resolve.plugins) {
        config.resolve.plugins.push(
          new TsconfigPathsPlugin({
            configFile: path.resolve(__dirname, "../tsconfig.json"),
          })
        );
      } else {
        config.resolve.plugins = [
          new TsconfigPathsPlugin({
            configFile: path.resolve(__dirname, "../tsconfig.json"),
          }),
        ];
      }
  
      // Return the altered config
      return config;
    },
  };
  