Refactoring work done
Hi @privateOmega,
I was delighted stumbling over your lib and took some steps further to improve it a little. My main concern was the bundle size and the usage in a browser. I started to work on it and had some success with it. If you are interested in it please have a look here: https://github.com/Cruaier/html-to-docx. I replaced virtual-dom with htmlparser2, removed all (not anymore) needed dependencies and switched to UintArray and Blob instead of Buffer. Bundling is done with vite instead of rollup (it was working better for me).
I tested my changes with your prepared tests and the result document is pretty much the same. The main benefit is the bundle size though as the artifacts are now less than half the size as before.
Feel free to take my changes (or the parts you like) and put them into your lib.
BR
@Cruaier Can you publish this version into npm I am interested to compare with existing one ? Looks a cool work, thank you !
@traycho here you go: https://www.npmjs.com/package/html-to-docx-lite I'll add to it when I have more time