tXml icon indicating copy to clipboard operation
tXml copied to clipboard

Project Status

Open avasilic opened this issue 2 years ago • 3 comments

Hi @TobiasNickel, is tXml still being maintained?

avasilic avatar Aug 30 '23 15:08 avasilic

I find to little time moving it forward to an esm module. it is just frustrating how node.js made common.js and esm so incompatible that there has never been a solution i liked.

otherwise the parser works fine.

TobiasNickel avatar Sep 11 '23 02:09 TobiasNickel

I was able to get it to work using

import * as txml from 'txml/dist/txml.mjs'

And if you use Typescript, then also set this in tsconfig.json

{
    "compilerOptions": {
        "paths": {
            "txml/dist/txml.mjs": ["./node_modules/txml/dist/txml.d.ts"]
        }
    }
}

Obviously having to manually specify where the types file is isn't ideal, but at least it works. :)

curiousdannii avatar Sep 23 '23 01:09 curiousdannii

Thank you @curiousdannii for this. Saved my day. For me it worked with

"paths": {
    "txml": ["./node_modules/txml/dist/index.d.ts"]
}

and

import { simplify, parse } from "txml";

MichaelKapustey avatar Dec 15 '23 16:12 MichaelKapustey