From d56c9a57c486f3ae582cd703aafba6c6f5f7eb90 Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Mon, 24 Nov 2025 10:09:37 -0300 Subject: [PATCH] chore(web-ui-registration): Review build configuration (#37584) --- packages/web-ui-registration/.babelrc.json | 9 --------- packages/web-ui-registration/.eslintrc.json | 2 +- packages/web-ui-registration/.storybook/main.ts | 3 ++- packages/web-ui-registration/.storybook/preview.tsx | 3 ++- packages/web-ui-registration/package.json | 12 ++++-------- packages/web-ui-registration/tsconfig.build.json | 3 --- packages/web-ui-registration/tsconfig.json | 3 +-- yarn.lock | 6 +----- 8 files changed, 11 insertions(+), 30 deletions(-) delete mode 100644 packages/web-ui-registration/.babelrc.json diff --git a/packages/web-ui-registration/.babelrc.json b/packages/web-ui-registration/.babelrc.json deleted file mode 100644 index f474986efbc..00000000000 --- a/packages/web-ui-registration/.babelrc.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "presets": [ - "@babel/preset-env", - ["@babel/preset-react", { - "runtime": "automatic" - }], - "@babel/preset-typescript" - ] -} diff --git a/packages/web-ui-registration/.eslintrc.json b/packages/web-ui-registration/.eslintrc.json index 4c413c4080b..341a3028337 100644 --- a/packages/web-ui-registration/.eslintrc.json +++ b/packages/web-ui-registration/.eslintrc.json @@ -1,4 +1,4 @@ { "extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react"], - "ignorePatterns": ["**/dist"] + "ignorePatterns": ["dist", "storybook-static", "!.storybook"] } diff --git a/packages/web-ui-registration/.storybook/main.ts b/packages/web-ui-registration/.storybook/main.ts index 0b3ef2e9ffa..1eca7fa8f87 100644 --- a/packages/web-ui-registration/.storybook/main.ts +++ b/packages/web-ui-registration/.storybook/main.ts @@ -1,4 +1,5 @@ import { dirname, join } from 'path'; + import type { StorybookConfig } from '@storybook/react-webpack5'; export default { @@ -6,7 +7,7 @@ export default { addons: [ getAbsolutePath('@storybook/addon-essentials'), getAbsolutePath('storybook-dark-mode'), - getAbsolutePath('@storybook/addon-webpack5-compiler-babel'), + getAbsolutePath('@storybook/addon-webpack5-compiler-swc'), ], framework: { diff --git a/packages/web-ui-registration/.storybook/preview.tsx b/packages/web-ui-registration/.storybook/preview.tsx index adb8bc2eeb2..5cd3e45119f 100644 --- a/packages/web-ui-registration/.storybook/preview.tsx +++ b/packages/web-ui-registration/.storybook/preview.tsx @@ -1,5 +1,6 @@ -import { themes } from '@storybook/theming'; import type { Parameters } from '@storybook/react'; +import { themes } from '@storybook/theming'; + import manifest from '../package.json'; import logo from './logo.svg'; import '@rocket.chat/fuselage/dist/fuselage.css'; diff --git a/packages/web-ui-registration/package.json b/packages/web-ui-registration/package.json index bd8310354e0..d2c7dc09009 100644 --- a/packages/web-ui-registration/package.json +++ b/packages/web-ui-registration/package.json @@ -16,11 +16,10 @@ "storybook": "storybook dev -p 6006 --no-version-updates", "typecheck": "tsc --noEmit" }, + "dependencies": { + "dompurify": "~3.2.7" + }, "devDependencies": { - "@babel/core": "~7.28.5", - "@babel/preset-env": "~7.28.5", - "@babel/preset-react": "~7.27.1", - "@babel/preset-typescript": "~7.27.1", "@rocket.chat/core-typings": "workspace:~", "@rocket.chat/css-in-js": "~0.31.25", "@rocket.chat/emitter": "~0.31.25", @@ -38,7 +37,7 @@ "@storybook/addon-actions": "^8.6.14", "@storybook/addon-docs": "^8.6.14", "@storybook/addon-essentials": "^8.6.14", - "@storybook/addon-webpack5-compiler-babel": "^3.0.6", + "@storybook/addon-webpack5-compiler-swc": "~3.0.0", "@storybook/react": "^8.6.14", "@storybook/react-webpack5": "^8.6.14", "@storybook/theming": "^8.6.14", @@ -70,8 +69,5 @@ }, "volta": { "extends": "../../package.json" - }, - "dependencies": { - "dompurify": "~3.2.7" } } diff --git a/packages/web-ui-registration/tsconfig.build.json b/packages/web-ui-registration/tsconfig.build.json index a175aec991c..73f50b10a96 100644 --- a/packages/web-ui-registration/tsconfig.build.json +++ b/packages/web-ui-registration/tsconfig.build.json @@ -1,8 +1,5 @@ { "extends": "./tsconfig.json", - "compilerOptions": { - "module": "ESNext" - }, "include": ["./src/**/*"], "exclude": ["./src/**/*.spec.ts", "./src/**/*.stories.tsx"] } diff --git a/packages/web-ui-registration/tsconfig.json b/packages/web-ui-registration/tsconfig.json index 9099a702aab..e1348ec0e2e 100644 --- a/packages/web-ui-registration/tsconfig.json +++ b/packages/web-ui-registration/tsconfig.json @@ -2,8 +2,7 @@ "extends": "@rocket.chat/tsconfig/client.json", "compilerOptions": { "rootDirs": ["./src","./.storybook"], - "outDir": "./dist", - "module": "CommonJS" + "outDir": "./dist" }, "include": ["./src", "./.storybook"], } diff --git a/yarn.lock b/yarn.lock index 48312dd35f1..97b7c37780a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10674,10 +10674,6 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/web-ui-registration@workspace:packages/web-ui-registration" dependencies: - "@babel/core": "npm:~7.28.5" - "@babel/preset-env": "npm:~7.28.5" - "@babel/preset-react": "npm:~7.27.1" - "@babel/preset-typescript": "npm:~7.27.1" "@rocket.chat/core-typings": "workspace:~" "@rocket.chat/css-in-js": "npm:~0.31.25" "@rocket.chat/emitter": "npm:~0.31.25" @@ -10695,7 +10691,7 @@ __metadata: "@storybook/addon-actions": "npm:^8.6.14" "@storybook/addon-docs": "npm:^8.6.14" "@storybook/addon-essentials": "npm:^8.6.14" - "@storybook/addon-webpack5-compiler-babel": "npm:^3.0.6" + "@storybook/addon-webpack5-compiler-swc": "npm:~3.0.0" "@storybook/react": "npm:^8.6.14" "@storybook/react-webpack5": "npm:^8.6.14" "@storybook/theming": "npm:^8.6.14"