Skip to content

Commit

Permalink
chore: add atomic loader to CDN deployment config (#4686)
Browse files Browse the repository at this point in the history
This PR ensures that the atomic loader is deployed to the CDN under the
atomic/v*/loader path.

https://coveord.atlassian.net/browse/KIT-3710
  • Loading branch information
fpbrault authored Nov 26, 2024
1 parent 505f138 commit 7a7e0ba
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/atomic-react/scripts/fix-loader-import-paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const files = [
];

const oldImport =
"import { defineCustomElements } from '@coveo/atomic/dist/loader';";
"import { defineCustomElements } from '@coveo/atomic/dist/atomic/loader';";
const newImport =
"import { defineCustomElements } from '@coveo/atomic/loader';";

Expand Down
8 changes: 4 additions & 4 deletions packages/atomic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"types": "dist/types/index.d.ts",
"exports": {
"./loader": {
"types": "./dist/loader/index.d.ts",
"import": "./dist/loader/index.js",
"require": "./dist/loader/index.cjs.js"
"types": "./dist/atomic/loader/index.d.ts",
"import": "./dist/atomic/loader/index.js",
"require": "./dist/atomic/loader/index.cjs.js"
},
".": {
"types": "./dist/types/index.d.ts",
Expand All @@ -42,7 +42,7 @@
"licenses/"
],
"scripts": {
"clean": "rimraf -rf dist/* dist-storybook/* www/* docs/* loader/* playwright-report/*",
"clean": "rimraf -rf dist/* dist-storybook/* www/* docs/* playwright-report/*",
"build": "nx build",
"build:locales": "npx nx build:locales atomic",
"start": "nx dev atomic",
Expand Down
4 changes: 1 addition & 3 deletions packages/atomic/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"!{projectRoot}/dist",
"!{projectRoot}/www",
"!{projectRoot}/docs",
"!{projectRoot}/loader",
"!{projectRoot}/src/components.d.ts"
],
"buildInputs": [
Expand All @@ -28,7 +27,6 @@
"{projectRoot}/dist",
"{projectRoot}/www",
"{projectRoot}/docs",
"{projectRoot}/loader",
"{projectRoot}/src/components.d.ts"
],
"executor": "nx:run-commands",
Expand Down Expand Up @@ -152,7 +150,7 @@
"dependsOn": ["^build", "cached:build:stencil"],
"executor": "nx:run-commands",
"options": {
"command": "rm ./dist/loader/package.json",
"command": "rm -f ./dist/atomic/loader/package.json",
"cwd": "packages/atomic"
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/atomic/stencil.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export const config: Config = {
},
{
type: 'dist',
esmLoaderPath: './atomic/loader',
collectionDir: null,
copy: [
{src: 'themes'},
Expand Down

0 comments on commit 7a7e0ba

Please sign in to comment.