From c8bf6514647d1b18db55c0c7c69107bd8f9861df Mon Sep 17 00:00:00 2001 From: Anoop N Date: Wed, 30 Oct 2024 20:49:43 +0530 Subject: [PATCH] build(manager-react-components): exclude ODS from bundle Signed-off-by: Anoop N --- packages/manager-react-components/package.json | 4 ++-- packages/manager-react-components/tsconfig.json | 4 ++-- packages/manager-react-components/vite.config.mts | 4 ++++ packages/manager/core/vite-config/src/config.js | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/manager-react-components/package.json b/packages/manager-react-components/package.json index 9ab00f04d7ea..ff233eda8db9 100644 --- a/packages/manager-react-components/package.json +++ b/packages/manager-react-components/package.json @@ -44,8 +44,6 @@ "@ovhcloud/ods-theme-blue-jeans": "17.2.2", "@tanstack/react-query": "^5.51.21", "@tanstack/react-table": "^8.20.1", - "@types/lodash.isdate": "^4.0.9", - "@types/lodash.isequal": "^4.5.0", "babel-preset-react-app": "^10.0.1", "clsx": "^2.1.1", "lodash.isdate": "^4.0.1", @@ -76,6 +74,8 @@ "@storybook/web-components-vite": "8.0.4", "@testing-library/jest-dom": "6.4.2", "@testing-library/react": "14.0.0", + "@types/lodash.isdate": "^4.0.9", + "@types/lodash.isequal": "^4.5.0", "@types/jest": "^29.5.5", "@types/node": "20.4.9", "@types/react": "18.2.45", diff --git a/packages/manager-react-components/tsconfig.json b/packages/manager-react-components/tsconfig.json index 7dd153f30550..abcf6d446ddb 100644 --- a/packages/manager-react-components/tsconfig.json +++ b/packages/manager-react-components/tsconfig.json @@ -1,11 +1,11 @@ { "compilerOptions": { - "lib": ["dom", "es2020"], + "lib": ["dom", "es2021"], "target": "ES2020", "types": ["vite/client", "node", "jest"], "module": "ESNext", "outDir": "dist", - "allowJs": false, + "allowJs": true, "resolveJsonModule": true, "skipLibCheck": true, "esModuleInterop": true, diff --git a/packages/manager-react-components/vite.config.mts b/packages/manager-react-components/vite.config.mts index 4dc3d5cecc2c..9b6a5f485e3f 100644 --- a/packages/manager-react-components/vite.config.mts +++ b/packages/manager-react-components/vite.config.mts @@ -55,6 +55,10 @@ export default defineConfig({ 'react-router-dom', 'react-i18next', 'zustand', + "@ovhcloud/ods-common-core", + "@ovhcloud/ods-common-theming", + "@ovhcloud/ods-components", + "@ovhcloud/ods-theme-blue-jeans" ], output: { globals: { diff --git a/packages/manager/core/vite-config/src/config.js b/packages/manager/core/vite-config/src/config.js index 7c206228dab7..f06466c5ae15 100644 --- a/packages/manager/core/vite-config/src/config.js +++ b/packages/manager/core/vite-config/src/config.js @@ -53,6 +53,7 @@ const getBaseConfig = (config) => { '@vitest', 'typescript', 'date-fns', + '@ovh-ux/manager-react-components', ], }, define: {