josdejong / josdejong/mathjs

custom_relational_functions example does not work with browser bundle

Open
#3,332 4 comments 0 reactions 0 assignees View on GitHub
design decision
Dominant language
JavaScript
Stars
15.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

Here is a JSFiddle with MathJS 14 using a direct copy of the [custom_relation_functions code](https://github.com/josdejong/mathjs/blob/develop/examples/advanced/custom_relational_functions.js):

https://jsfiddle.net/uonxj72q/

The output shows that the custom relation functions do not seem to be used. (E.g. when I put a debugger into them).

Oddly enough this seems to be related somehow to how the browser bundler is working, because the same code is working for me when using Vite to bundle it from node_modules.

Been trying to figure out what's going on for a couple of hours now, and frankly hitting a wall 😟.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.