astronomy
astronomy copied to clipboard
Node importing broken
I think this was broken by #263.
When importing using import * as Astronomy from 'astronomy-engine';
into a Node project that is marked as a module in package.json or into an .mjs file, it works correctly when using version 2.1.7, but if you use the latest 2.1.15 version, you will get the following error:
/Users/brad/Downloads/test/node_modules/astronomy-engine/esm/astronomy.js:38
export const C_AUDAY = 173.1446326846693;
^^^^^^
SyntaxError: Unexpected token 'export'
It seems to work in both versions when using require
.