I'm facing a challenge when trying to bring in an npm package into a Vue component.
This package (JSPrintManager - here) consists of a JavaScript file with no exports. Therefore, I'm unable to utilize the following import statements:
import { JSPM } from "jsprintmanager"
My attempts with the following imports have also been unsuccessful:
import JSPM from "jsprintmanager"
import * as JSPM from "../../node_modules/jsprintmanager/JSPrintManager"
import * as JSPM from "../../node_modules/jsprintmanager/JSPrintManager.js"
Could it be that I'm headed in the wrong direction?
If importing an npm package that isn't a module is impossible, is there an alternative method to incorporate the necessary JavaScript file (currently located in my node-modules directory) into my component?
I'm working with the Vue CLI