Open RCBiczok opened 8 months ago
I think the key is to use "moduleResolution": "bundler"
in tsconfig.json
.
https://stackblitz.com/edit/schoero-swissqrbill-avypz7?file=src%2Fpdf.ts (open in chrome)
Jup that solved it - thank you!
With swissqrbill v4.0.2, it should now be possible to also use "moduleResolution": "NodeNext"
.
@schoero NodeNext
is not working for me because your https://github.com/schoero/svg-engine does not seem to be ready for that.
error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'.
Did you mean '../elements/SVGElement.js'?
Thank you for mentioning @pavelsvagr. I will have a look at it
@pavelsvagr I was not able to reproduce your error. For me it always works, both for svg and pdf files 🤷♂️
But I have updated svg-engine
and fixed the imports that had no file extension. Can you update to the latest version of svg-engine
by running
npm update svg-engine
in your project and let me know if that fixed the problem? Would it otherwise be possible for you to provide a minimal example to reproduce the error?
First - thank you so much for this package!
I unfortunately encountered one minor problem when using swissqrcode 4 in webpack + Typescript projects. It somehow is not able to resolve this imports:
It works when I add the "lib" prefix in each element of the export section within the package.json and changing the import to
Could it be that the build somehow is not supposed to generate the *d.ts files within the "lib" folders?
I can try to make an PR with a test to fix if you encouter the same error.