I have created a Excel Custom Function JS add-in by using Yeoman generator for Office Add-ins.
I have followed the template and tried to add one more custom functions in the ./src/functions/functions.js file.
The added function comes from a dll hence I need require('ffi') first in the function.js or import. However, when I build and start testing the functions in Excel, I got #value error and the error message in the debug log shows:
Verbose Runtime [Console] [Log] I'm `fs` modules
or Verbose Runtime [Console] [Log] Unexpected CustomFunctions [Execution] [End] [Failure] [ExceptionThrown] Function=JSCALL1 TypeError: Object doesn't support property or method 'captureStackTrace' {}
I tried including ffi in the webpack.ProvidePlugin to make it globally available so I don't need to require, but this doesnt work.