Hello! I’ve been having a lot of fun developing JS scripts for Kintone, and I’m currently moving on to developing my first plugin from scratch through plugin-packer.
I wanted to reference some npm packages (e.g. moment, sweetalert2), but I get the following error when using ‘require’:
_"Uncaught ReferenceError: require is not defined"_
For JS customizations, I could use 'require'
references with no issues, likely because I bundled first through webpack before uploading to Kintone.
But I wonder if plugin-packer acts differently (i.e. not necessarily bundling?).
My plugin works perfectly if I remove the “require” and related functions.
The Import line:
const moment = require(‘moment’);
Thank you in advance for any tips!