Customer constrains force us to manually import npm packages
-
Hello,
due to some constraints we are unable to download npm packages at a customers system, we circumvented that issue by injecting the package in the docker image before we send it to the customer, but that solution won't work anymore because they now require us to send non modified images.
So what I tried was bundling the package (https://www.npmjs.com/package/bwip-js) myself and creating a minified version I put inside jsreport as a asset.
I then tried importing it into my code using
const bwipjs = await jsreport.assets.require('/shared/packages/bwipjs.js')
which resulted in a bunch of errors.
I just wanted to ask if that is the usual way to import such packages into the code or are there better ways?Thanks for your help.