-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add crdt to the API package to fix types #2738
Conversation
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -15,6 +15,7 @@ config.resolve.extensions = [ | |||
'.json', | |||
]; | |||
config.resolve.fallback = {}; | |||
config.externals.push('@actual-app/crdt'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary, but if we are going to depend on the package in the api, might as well use it rather than have it in the webpack bundle. I did confirm the built API was still working after this change. By importing some transactions via the api.
Bundle Stats — desktop-clientHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset No files were changed View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
Bundle Stats — loot-coreHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset No files were changed View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
- This way we get the crdt types supported
Instead of adding crdt as a dependency, I did confirm we could generate just the crdt types and copy them into the api like we do for loot-core. But then we still get an error regarding the google-protobuf types missing. Which is fixed by adding google-protobuf to our api dependencies. Being that a dependency needed to be added to the api either way, I just did the crdt one for now (which includes the google-protobuf dependency)
I believe this is the final unblocker for shipping the types with the API in #2559