What's happening?
Right now, we only have 1 class to render the cartesian plane, it can be found on /src/assets/ts/Descartesian.ts or in /src/assets/js/Descartesian.js for transpiled version. The class is being exported by default.
We also have an entrypoint, located at /src/index.js who imports the class and later exports the same class like that:
import Descartesian from './js/Descartesian'
export default Descartesian
The problem is when you're importing the module on another application, using import Descartesian from 'descartesian'
it returns e blank object {}
instead of a constructor. I've spent a lot of time trying to figure out what's going on and testing with different methods of exporting and importing, but the problem continues. If anyone could give me a hand on this i would appreciate.
Right now, i'm using a little workaround to get the package running, instead of exporting on the entrypoint, i'm adding it to a global scope within the browser
if(window !== undefined){
window.Descartesian = Descartesian
}