danfojs
danfojs copied to clipboard
Fix/594 exports
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:
import * as dfd from 'danfojs'
const s = new dfd.Series([1, 3, 5, undefined, 6, 8])
s.print()
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:
WARNING in ../danfojs/src/danfojs-browser/lib/bundle.esm.js 9:47-54
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
WARNING in ../danfojs/src/danfojs-browser/lib/bundle.esm.js 12:44-51
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
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.
This fix makes the package run on Vite. Pls merge this fix.
@risenW @steveoni Any plans for merging this fix?
I hit this today attempting to try out danfojs for the first time. Any plans to merge in the fix?