Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(atomic)!: externalize dependencies #4393

Merged
merged 43 commits into from
Sep 18, 2024
Merged

chore(atomic)!: externalize dependencies #4393

merged 43 commits into from
Sep 18, 2024

Conversation

fpbrault
Copy link
Contributor

@fpbrault fpbrault commented Sep 10, 2024

This PR removes Headless from the Atomic/Atomic-react bundles.

It does that by replacing the imports with the URL to the correct version of headless in the CDN. This is done with a custom rollup plugin that finds all the imports with AST and replaces them with the corresponding string.

This only happens when building with the DEPLOYMENT_ENVIRONMENT env variable set to "CDN".

https://coveord.atlassian.net/browse/KIT-3181

Copy link

github-actions bot commented Sep 10, 2024

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 239.2 239.2 0
commerce 337.8 337.8 0
search 407.2 407.2 0
insight 392.1 392.1 0
recommendation 250 250 0
ssr 401.3 401.3 0
ssr-commerce 350 350 0

SSR Progress

Use case SSR (#) CSR (#) Progress (%)
search 39 44 89
recommendation 0 4 0
case-assist 0 6 0
insight 0 27 0
commerce 0 15 0
Detailed logs search : buildInteractiveResult
search : buildInteractiveInstantResult
search : buildInteractiveRecentResult
search : buildInteractiveCitation
search : buildGeneratedAnswer
recommendation : missing SSR support
case-assist : missing SSR support
insight : missing SSR support
commerce : missing SSR support

Copy link
Collaborator

@louis-bompart louis-bompart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good first draft.
Ideally let's use something that leverage an AST to ensure we replacement actual imports.
Moreover, let's add coveo.analytics in the external as well

scripts/deploy/replace-external-deps-with-cdn.mjs Outdated Show resolved Hide resolved
@louis-bompart louis-bompart merged commit b599477 into master Sep 18, 2024
117 checks passed
@louis-bompart louis-bompart deleted the KIT-3181 branch September 18, 2024 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants