-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
SyntaxError: Unexpected token 'export' in Jest environment using mathjs/number
#1766
Comments
Thanks for reporting, this is a good point and is currently inconsistent. We should be careful to change this, that may break existing usage. for the main library {
"main": "main/es5",
"module": "main/esm"
} I'm not sure if it is possible to have this switch working for Any ideas? |
btw you can always use the right import by choosing from:
|
Anyone able to figure out the consequences and think through a solution? Help would be very welcome. |
I mentioned this briefly on #1928 but this problem may be solvable using Subpath Exports. I've not used them before, but the documentation looks promising. |
Error Description
I use
mathjs@6.6.1
in my applicationWhen execute Jest test, this error was displayed.
Suggestion
In mathjs/index.js using
module.exports
mathjs/index.js
Line 5 in 86606dc
But mathjs/number.js using
export * from ''
different from mathjs/index.jsmathjs/number.js
Line 1 in 86606dc
So, I change the mathjs/number.js, Jest test was passed.
The text was updated successfully, but these errors were encountered: