From 33c1264b5401bab604d5b0e989108693e0c5b599 Mon Sep 17 00:00:00 2001 From: Malcolm Smith <20709258+msmithNI@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:43:28 -0600 Subject: [PATCH] Storybook build fixes --- package-lock.json | 18 ------------------ packages/storybook/.storybook/main.js | 23 +++++++++-------------- packages/storybook/package.json | 1 - 3 files changed, 9 insertions(+), 33 deletions(-) diff --git a/package-lock.json b/package-lock.json index 83aaa1f638..4c970ff7f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7307,23 +7307,6 @@ } } }, - "node_modules/@storybook/addon-mdx-gfm": { - "version": "8.4.6", - "resolved": "https://registry.npmjs.org/@storybook/addon-mdx-gfm/-/addon-mdx-gfm-8.4.6.tgz", - "integrity": "sha512-wagsSBUN6pwcSZSWxp/aOhE16ZKI8ZW4XeRT6QivySmkJaLcbva+HNvQOijdXIM28W8PprKjqtyVa8nu4YQxsw==", - "dev": true, - "dependencies": { - "remark-gfm": "^4.0.0", - "ts-dedent": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^8.4.6" - } - }, "node_modules/@storybook/addon-measure": { "version": "8.4.6", "resolved": "https://registry.npmjs.org/@storybook/addon-measure/-/addon-measure-8.4.6.tgz", @@ -28144,7 +28127,6 @@ "@storybook/addon-essentials": "^8.4.3", "@storybook/addon-interactions": "^8.4.3", "@storybook/addon-links": "^8.4.3", - "@storybook/addon-mdx-gfm": "^8.4.3", "@storybook/addon-webpack5-compiler-swc": "^1.0.5", "@storybook/cli": "^8.4.3", "@storybook/csf": "^0.1.11", diff --git a/packages/storybook/.storybook/main.js b/packages/storybook/.storybook/main.js index 4cb5852aa9..c5fbe9067d 100644 --- a/packages/storybook/.storybook/main.js +++ b/packages/storybook/.storybook/main.js @@ -1,4 +1,3 @@ -import { dirname, join } from 'path'; import remarkGfm from 'remark-gfm'; import CircularDependencyPlugin from 'circular-dependency-plugin'; import TerserPlugin from 'terser-webpack-plugin'; @@ -12,13 +11,13 @@ export const stories = [ ]; export const addons = [ { - name: getAbsolutePath('@storybook/addon-essentials'), + name: '@storybook/addon-essentials', options: { outline: false, docs: false } }, { - name: getAbsolutePath('@storybook/addon-docs'), + name: '@storybook/addon-docs', options: { mdxPluginOptions: { mdxCompileOptions: { @@ -27,12 +26,12 @@ export const addons = [ } } }, - getAbsolutePath('@storybook/addon-a11y'), - getAbsolutePath('@storybook/addon-interactions'), - getAbsolutePath('@chromatic-com/storybook'), - getAbsolutePath('@storybook/addon-webpack5-compiler-swc'), - getAbsolutePath('storybook-addon-pseudo-states'), - getAbsolutePath('@storybook/addon-mdx-gfm') + '@storybook/addon-a11y', + '@storybook/addon-interactions', + '@chromatic-com/storybook', + '@storybook/addon-webpack5-compiler-swc', + 'storybook-addon-pseudo-states', + '@storybook/addon-mdx-gfm' ]; export function webpackFinal(config) { @@ -65,9 +64,5 @@ export function webpackFinal(config) { } export const staticDirs = ['public']; export const framework = { - name: getAbsolutePath('@storybook/html-webpack5') + name: '@storybook/html-webpack5' }; - -function getAbsolutePath(value) { - return dirname(require.resolve(join(value, 'package.json'))); -} diff --git a/packages/storybook/package.json b/packages/storybook/package.json index f791668487..9651a049b4 100644 --- a/packages/storybook/package.json +++ b/packages/storybook/package.json @@ -33,7 +33,6 @@ "@storybook/addon-essentials": "^8.4.3", "@storybook/addon-interactions": "^8.4.3", "@storybook/addon-links": "^8.4.3", - "@storybook/addon-mdx-gfm": "^8.4.3", "@storybook/addon-webpack5-compiler-swc": "^1.0.5", "@storybook/cli": "^8.4.3", "@storybook/csf": "^0.1.11",