Closed davidbesteltunts closed 1 year ago
I am not really familiar with typescript, but minify-xml
, like next to all current NodeJS libraries is now using the ES module format, since its 4.0.0 release. The last release supporting the old CommonJS module format / require
is 3.5.0. I don't know how to instruct TypeScript NOT to transpile an import
into a require
, but I would not consider this one a bug of minify-xml
.
thanks for the reply, I'll try other alternatives.
@davidbesteltunts you are welcome. :) As said, you can also pin to 3.5.0, which still supports require and has no further changes adapted yet. In order to consume ES modules in typescript see [1].
[1] https://www.typescriptlang.org/docs/handbook/modules/reference.html#node16-nodenext
Hello, I'm trying to use the library but I'm getting this error:
My project is in Typescript, maybe it's some incorrect configuration on my part, but I'd like to ask if you've ever experienced this error?
I'm importing the library this way:
import minifyXML from 'minify-xml';
In dist it looks like this:
var import_minify_xml = __toESM(require("minify-xml"))