From 90719ac015d63338e50f6efe9690fee4be3e8191 Mon Sep 17 00:00:00 2001 From: Michael Esteban Date: Tue, 7 Jan 2025 18:30:53 +1000 Subject: [PATCH] chore: bump @storybook/addon-webpack5-compiler-swc from 1.0.5 to 2.0.0 (#7388) chore: update SWC configuration for TypeScript support & bump addon-webpack5-compiler-swc --- apps/site/.storybook/main.ts | 14 +++++++++++++- apps/site/package.json | 2 +- package-lock.json | 9 ++++----- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/apps/site/.storybook/main.ts b/apps/site/.storybook/main.ts index 5fe13732dc295..f6b01fc299b9a 100644 --- a/apps/site/.storybook/main.ts +++ b/apps/site/.storybook/main.ts @@ -11,7 +11,19 @@ const config: StorybookConfig = { typescript: { reactDocgen: false, check: false }, core: { disableTelemetry: true, disableWhatsNewNotifications: true }, framework: '@storybook/react-webpack5', - swc: () => ({ jsc: { transform: { react: { runtime: 'automatic' } } } }), + swc: () => ({ + jsc: { + parser: { + syntax: 'typescript', + tsx: true, + }, + transform: { + react: { + runtime: 'automatic', + }, + }, + }, + }), addons: [ '@storybook/addon-webpack5-compiler-swc', '@storybook/addon-controls', diff --git a/apps/site/package.json b/apps/site/package.json index a0073ca09e9de..ffe43f6ce390e 100644 --- a/apps/site/package.json +++ b/apps/site/package.json @@ -83,7 +83,7 @@ "@storybook/addon-styling-webpack": "^1.0.1", "@storybook/addon-themes": "^8.4.6", "@storybook/addon-viewport": "^8.4.6", - "@storybook/addon-webpack5-compiler-swc": "^1.0.5", + "@storybook/addon-webpack5-compiler-swc": "^2.0.0", "@storybook/react-webpack5": "^8.4.6", "@testing-library/jest-dom": "~6.6.3", "@testing-library/react": "~16.1.0", diff --git a/package-lock.json b/package-lock.json index 569c9367d9c92..b1ce683922363 100644 --- a/package-lock.json +++ b/package-lock.json @@ -94,7 +94,7 @@ "@storybook/addon-styling-webpack": "^1.0.1", "@storybook/addon-themes": "^8.4.6", "@storybook/addon-viewport": "^8.4.6", - "@storybook/addon-webpack5-compiler-swc": "^1.0.5", + "@storybook/addon-webpack5-compiler-swc": "^2.0.0", "@storybook/react-webpack5": "^8.4.6", "@testing-library/jest-dom": "~6.6.3", "@testing-library/react": "~16.1.0", @@ -4930,11 +4930,10 @@ } }, "node_modules/@storybook/addon-webpack5-compiler-swc": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@storybook/addon-webpack5-compiler-swc/-/addon-webpack5-compiler-swc-1.0.5.tgz", - "integrity": "sha512-1NlM3noit2vA22OyWb8Ma2lhcEKCS1Snv2kr+EkaVABUqNDfVc9AD/GgYQhF7F/2CoF5N2JU7uzXDzFHd5TzZg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@storybook/addon-webpack5-compiler-swc/-/addon-webpack5-compiler-swc-2.0.0.tgz", + "integrity": "sha512-8lL6vzXMgBFYQ89TFNPG4KjQ1WcRjKOubCTsnv0lRWC6KbF1ipyMFiEDpHOxxHbKhfk2kvQKZVqt8KLNV5zwcg==", "dev": true, - "license": "MIT", "dependencies": { "@swc/core": "^1.7.3", "swc-loader": "^0.2.3"