[ ] PR title descriptive (can be used in release notes)
Description
When a calc function tries to refer to another calc function everything works fine in development, however in production there is a mismatch in the names of functions made available to evaluator context, and the names of the functions as minified by the angular compiler.
This PR adds a small workaround so that all calc functions can also be accessed via a window.calc method, which preserves the names.
Review Notes
Create a production build
yarn build
Use npm serve module to serve the contents of the production build locally (reads from local seve.json for config)
npx serve
Dev Notes
I've added to #2131 as a reminder to try and address this issue in a better way in the future if possible (currently still possible for developers to write functions that work locally but not production)
Git Issues
Closes #
Screenshots/Videos
Debug sheets working in production serve (port 5000). Previously was white-screen
PR Checklist
Description
When a calc function tries to refer to another calc function everything works fine in development, however in production there is a mismatch in the names of functions made available to evaluator context, and the names of the functions as minified by the angular compiler.
This PR adds a small workaround so that all calc functions can also be accessed via a
window.calc
method, which preserves the names.Review Notes
Create a production build
Use npm
serve
module to serve the contents of the production build locally (reads from localseve.json
for config)Dev Notes
I've added to #2131 as a reminder to try and address this issue in a better way in the future if possible (currently still possible for developers to write functions that work locally but not production)
Git Issues
Closes #
Screenshots/Videos
Debug sheets working in production serve (port 5000). Previously was white-screen