-
-
Notifications
You must be signed in to change notification settings - Fork 208
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/594 exports #604
base: dev
Are you sure you want to change the base?
Fix/594 exports #604
Conversation
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.
The project seems to be using yarn, so this file is unnecessary and was generating warnings running yarn
@@ -8,7 +8,14 @@ | |||
], | |||
"scripts": { | |||
"install": "cd src/danfojs-base && yarn && cd ../danfojs-browser && yarn && cd ../danfojs-node && yarn", | |||
"build": "cd src/danfojs-node && yarn build:clean && cd ../danfojs-browser && yarn build:clean", | |||
"test": "cd src/danfojs-base && yarn && cd ../danfojs-node && yarn && yarn test:clean && cd ../danfojs-browser && yarn && yarn test:clean" | |||
"build": "yarn build:browser && yarn build:node", |
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.
This comes from my other PR #603 so I could run build and tests independently from the root of the project
"module": "lib/bundle-esm.js", | ||
"exports": { | ||
".": { | ||
"types": "./dist/danfojs-browser/src/index.d.ts", |
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'm really unsure about the correct syntax here.
This fix makes the package run on Vite. Pls merge this fix. |
I hit this today attempting to try out danfojs for the first time. Any plans to merge in the fix? |
fixes #594 (and maybe also #545 and #527)
For a new vite app, a new CRA app and a new Vuew app, I've linked the package locally with
npm link danfojs
, then used the following code in the root file:Both apps run fine without runtime errors and display the series in the console.
However, types don't work, and I get the following error in CRA terminal output:
I'm also new to package exports, so it's all a little blurry, but hopefully that's a start to fix the issues and could do with some help to finish it off.