Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring work done #232

Open
Cruaier opened this issue Jan 7, 2024 · 4 comments
Open

Refactoring work done #232

Cruaier opened this issue Jan 7, 2024 · 4 comments

Comments

@Cruaier
Copy link

Cruaier commented Jan 7, 2024

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

@traycho
Copy link

traycho commented Mar 20, 2024

@Cruaier Can you publish this version into npm I am interested to compare with existing one ?
Looks a cool work, thank you !

@Cruaier
Copy link
Author

Cruaier commented Apr 14, 2024

@traycho here you go: https://www.npmjs.com/package/html-to-docx-lite
I'll add to it when I have more time

@349989153
Copy link

349989153 commented May 7, 2024

@traycho here you go: https://www.npmjs.com/package/html-to-docx-lite I'll add to it when I have more time

Thank you for ur work, however, I tried to open the exported .docx or .doc via Microsoft® Word 适用于 Microsoft 365MSO ( 2403 Build 16.0.17425.20176) 64 on Windows system, but I failed.

@Cruaier
Copy link
Author

Cruaier commented May 7, 2024

I don't know if that's related to my version or not. Please create an issue here https://github.com/Dobe-Solutions/html-to-docx-lite/issues and give me some example html to have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants