-
Notifications
You must be signed in to change notification settings - Fork 169
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
Fix @google/generative-ai/files paths #156
Conversation
"browser": "./dist/files/index.mjs", | ||
"module": "./dist/files/index.mjs", | ||
"typings": "./dist/files/files.d.ts" | ||
"main": "../dist/files/index.js", |
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.
Would this break the module imports?
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.
Module imports? I realized it might affect the rollup config as it gets paths from here, so I changed that.
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.
I tested this with tsconfig set to module:commonjs, module:node16 and in a vite bundler proejct and it seems to work in all cases.
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.
LGTM!
Fixes #155
This affects TypeScript users that are using "module: commonjs" or any other resolution that relies on the package.json in the files/ directory instead of on package.json exports.