diff --git a/packages/atomic-react/package.json b/packages/atomic-react/package.json index a5675de0050..1da26fc2690 100644 --- a/packages/atomic-react/package.json +++ b/packages/atomic-react/package.json @@ -21,7 +21,7 @@ "promote:npm:latest": "node ../../scripts/deploy/update-npm-tag.mjs latest", "build:assets": "ncp ../atomic/dist/atomic/assets dist/assets && ncp ../atomic/dist/atomic/lang dist/lang " }, - "main": "./dist/cjs/atomic-react.js", + "main": "./dist/cjs/atomic-react.cjs", "module": "./dist/index.js", "types": "./dist/index.d.ts", "files": [ @@ -63,17 +63,17 @@ ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js", - "require": "./dist/cjs/atomic-react.js" + "require": "./dist/cjs/atomic-react.cjs" }, "./commerce": { "types": "./dist/commerce.index.d.ts", "import": "./dist/commerce.index.js", - "require": "./dist/cjs/commerce/atomic-react.js" + "require": "./dist/cjs/commerce/atomic-react.cjs" }, "./recommendation": { "types": "./dist/recommendation.index.d.ts", "import": "./dist/recommendation.index.js", - "require": "./dist/cjs/recommendation/atomic-react.js" + "require": "./dist/cjs/recommendation/atomic-react.cjs" } } } diff --git a/packages/atomic-react/rollup.config.mjs b/packages/atomic-react/rollup.config.mjs index 20e58942cdd..c525b9a58bd 100644 --- a/packages/atomic-react/rollup.config.mjs +++ b/packages/atomic-react/rollup.config.mjs @@ -97,7 +97,7 @@ const commonExternal = [ /** @returns {import('rollup').OutputOptions} */ const outputCJS = ({useCase}) => ({ - file: `dist/cjs/${useCase}atomic-react.js`, + file: `dist/cjs/${useCase}atomic-react.cjs`, format: 'cjs', }); diff --git a/packages/atomic/package.json b/packages/atomic/package.json index f9e54d00644..349dc6a9229 100644 --- a/packages/atomic/package.json +++ b/packages/atomic/package.json @@ -14,14 +14,14 @@ "types": "dist/types/index.d.ts", "exports": { "./loader": { + "types": "./loader/index.d.ts", "import": "./loader/index.js", - "require": "./loader/index.cjs.js", - "types": "./loader/index.d.ts" + "require": "./loader/index.cjs.js" }, ".": { + "types": "./dist/types/index.d.ts", "import": "./dist/index.js", - "require": "./dist/index.cjs.js", - "types": "./dist/types/index.d.ts" + "require": "./dist/index.cjs.js" }, "./themes/*": { "import": "./dist/atomic/themes/*", @@ -39,7 +39,8 @@ "files": [ "dist/", "docs/", - "licenses/" + "licenses/", + "loader/" ], "scripts": { "clean": "rimraf -rf dist/*", diff --git a/packages/headless/esbuild.mjs b/packages/headless/esbuild.mjs index f338a8a8436..87e99e222a0 100644 --- a/packages/headless/esbuild.mjs +++ b/packages/headless/esbuild.mjs @@ -210,7 +210,7 @@ async function buildBrowserConfig(options, outDir) { const nodeCjs = Object.entries(useCaseEntries).map((entry) => { const [useCase, entryPoint] = entry; const dir = getUseCaseDir('dist/', useCase); - const outfile = `${dir}/headless.js`; + const outfile = `${dir}/headless.cjs`; return buildNodeConfig( { entryPoints: [entryPoint], diff --git a/packages/headless/package.json b/packages/headless/package.json index bc217fa4844..57d26d71b2a 100644 --- a/packages/headless/package.json +++ b/packages/headless/package.json @@ -6,7 +6,7 @@ "url": "git+https://github.com/coveo/ui-kit.git", "directory": "packages/headless" }, - "main": "./dist/headless.js", + "main": "./dist/headless.cjs", "module": "./dist/headless.esm.js", "type": "module", "exports": { @@ -15,7 +15,7 @@ "node": { "types": "./dist/definitions/index.d.ts", "import": "./dist/headless.esm.js", - "require": "./dist/headless.js" + "require": "./dist/headless.cjs" }, "browser": { "types": "./dist/definitions/index.d.ts", @@ -30,7 +30,7 @@ "node": { "types": "./dist/definitions/case-assist.index.d.ts", "import": "./dist/case-assist/headless.esm.js", - "require": "./dist/case-assist/headless.js" + "require": "./dist/case-assist/headless.cjs" }, "browser": { "types": "./dist/definitions/case-assist.index.d.ts", @@ -45,7 +45,7 @@ "node": { "types": "./dist/definitions/commerce.index.d.ts", "import": "./dist/commerce/headless.esm.js", - "require": "./dist/commerce/headless.js" + "require": "./dist/commerce/headless.cjs" }, "browser": { "types": "./dist/definitions/commerce.index.d.ts", @@ -60,7 +60,7 @@ "node": { "types": "./dist/definitions/insight.index.d.ts", "import": "./dist/insight/headless.esm.js", - "require": "./dist/insight/headless.js" + "require": "./dist/insight/headless.cjs" }, "browser": { "types": "./dist/definitions/insight.index.d.ts", @@ -75,7 +75,7 @@ "node": { "types": "./dist/definitions/recommendation.index.d.ts", "import": "./dist/recommendation/headless.esm.js", - "require": "./dist/recommendation/headless.js" + "require": "./dist/recommendation/headless.cjs" }, "browser": { "types": "./dist/definitions/recommendation.index.d.ts", @@ -90,7 +90,7 @@ "node": { "types": "./dist/definitions/ssr.index.d.ts", "import": "./dist/ssr/headless.esm.js", - "require": "./dist/ssr/headless.js" + "require": "./dist/ssr/headless.cjs" }, "browser": { "types": "./dist/definitions/ssr.index.d.ts", @@ -105,7 +105,7 @@ "node": { "types": "./dist/definitions/ssr-commerce.index.d.ts", "import": "./dist/ssr-commerce/headless.esm.js", - "require": "./dist/ssr-commerce/headless.js" + "require": "./dist/ssr-commerce/headless.cjs" }, "browser": { "types": "./dist/definitions/ssr-commerce.index.d.ts",