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: build API with esnext target #6926

Merged
merged 1 commit into from Feb 6, 2024
Merged

Conversation

benmccann
Copy link
Contributor

@benmccann benmccann commented Feb 5, 2024

Removes a bunch of polyfill code from the API that's unnecessary. The CLI and web projects are built with Vite and support for any newer features will already be added at that time if needed.

This should make the web frontend load a bit faster. I didn't benchmark the web project, but for reference here's the output difference for the CLI

Size of the CLI on main:
dist/index.js 1,088.98 kB

Size of CLI with this PR:
dist/index.js 760.50 kB

@etnoy etnoy added the sdk label Feb 5, 2024
@etnoy
Copy link
Contributor

etnoy commented Feb 5, 2024

Is it preferable to use esnext or to fix it to something like es2022?

@benmccann
Copy link
Contributor Author

esnext is best for packages like the API that aren't used directly, but are included and built as part of an application (the web package and CLI package in this case). When we build the web and CLI those packages specify their own target and compile the API in a way that works to ensure support for older browsers or older versions of Node.

@etnoy etnoy added maintenance and removed sdk labels Feb 5, 2024
@etnoy etnoy merged commit 0169707 into immich-app:main Feb 6, 2024
25 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants