I'm trying to access a MySQL database from a Microsoft Office Add-In. I can get the Add-In to work in MsWord, but when I try to use the MySQL Node.js driver, the "mysql" object shows up as null at runtime.
I added this at the beginning of taskpane.js:
import { mysql } from 'mysql';
did the following:
npm install mysql
npm audit fix
npm install @types/mysql
added the following to webpack.config.js "target: 'node',"
and later in the code, when I run it this fires and shows "mysql undefined":
if (!mysql) {
context.document.body.insertParagraph("mysql undefined", Word.InsertLocation.end);
What am I missing or doing wrong?
