From ebe818819ccab99b9b2be3c67bf7818238e9917a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Vilcot?= <47554752+fredericvilcot@users.noreply.github.com> Date: Wed, 18 Dec 2024 07:59:20 +0100 Subject: [PATCH] build(pci-common): handle cjs files in dist folder (#14614) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frédéric Vilcot --- packages/manager/modules/manager-pci-common/package.json | 3 ++- packages/manager/modules/manager-pci-common/vite.config.mjs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/manager/modules/manager-pci-common/package.json b/packages/manager/modules/manager-pci-common/package.json index ef459dde1036..07452df9803d 100644 --- a/packages/manager/modules/manager-pci-common/package.json +++ b/packages/manager/modules/manager-pci-common/package.json @@ -15,7 +15,8 @@ "license": "BSD-3-Clause", "author": "OVH SAS", "type": "module", - "main": "dist/index.js", + "main": "dist/index.cjs", + "module": "dist/index.esm.js", "types": "dist/types/index.d.ts", "files": [ "dist" diff --git a/packages/manager/modules/manager-pci-common/vite.config.mjs b/packages/manager/modules/manager-pci-common/vite.config.mjs index 56c8acd4dc6a..7e3440d030e8 100644 --- a/packages/manager/modules/manager-pci-common/vite.config.mjs +++ b/packages/manager/modules/manager-pci-common/vite.config.mjs @@ -52,7 +52,7 @@ export default defineConfig({ entry: path.resolve(pathSrc, 'index.ts'), name: 'ManagerPciCommonLib', fileName: 'index', - formats: ['es'], + formats: ['esm', 'cjs'], }, rollupOptions: { external: (id) =>