From 8a79e815bccb82778081d73d152647673d0d1ef2 Mon Sep 17 00:00:00 2001 From: Dave <39203354+mann-david@users.noreply.github.com> Date: Tue, 23 Nov 2021 16:45:21 -0500 Subject: [PATCH] Add require line for TsconfigPathsPlugin you also need const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); in main.js. Obvious, perhaps, but it could save someone a step if they miss it (like I did :-) ) --- .../common/storybook-main-ts-module-resolution.js.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/snippets/common/storybook-main-ts-module-resolution.js.mdx b/docs/snippets/common/storybook-main-ts-module-resolution.js.mdx index 20fbcf426975..032e0aa9005a 100644 --- a/docs/snippets/common/storybook-main-ts-module-resolution.js.mdx +++ b/docs/snippets/common/storybook-main-ts-module-resolution.js.mdx @@ -1,6 +1,8 @@ ```js // .storybook/main.js +const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); + module.exports = { webpackFinal: async (config) => { config.resolve.plugins = [ @@ -12,4 +14,4 @@ module.exports = { return config; }, }; -``` \ No newline at end of file +```