-
Notifications
You must be signed in to change notification settings - Fork 150
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
Will this project work in browser? #3
Comments
@QQCif Currently this project was made targeting both Node and Frontend frameworks like React, Vue etc. But I will try to add direct browser support ASAP. |
Working on this under feature/browser-example |
I installed this in my react typescript application but gives node js related errors such as Is there any specific instructions that need to be followed to use this in React. |
@privateOmega what will be the state of the branch for the browser support? Can we have this feature of browser support? |
The problem is: |
@BikashKNayak @anirudh-modi Sorry for the late reply, I haven't been following this project as much as I would like to due to other commitments. The problem with implementing this package in browser is exactly like @josx said, I started working on this project with an aim to support both ends of the stack but I had to import node-libtidy into the package which essentially cleans up HTML and only works in node environment. Since I have multiple people interested in this being implemented at browser, I will try to work on the package ASAP, removing node-libtidy dependency and supporting browsers. Anyone who is interested can also take this up. |
Removed the libtidy dependency. |
great! |
Is there any update on how this can work with browser now? |
I'm interested on how this can work with browser |
Same here, would love to see it working in the browser. Thanks a lot! |
+1 for browser support. I'll comment so I'm notified of progress. |
Guys, I am delighted to know that people have noticed my very first OSS package, thanks for the following. Good news - Figured out the problematic dependency and removed it in feature/browser-example branch, a minifier plugin called Bad news - In browser, I am getting an error of an import from Cheers NB: People who want to try out this change in react, I guess for now you could do Edit: |
hi, @privateOmega, Help please, sorry i just can't get it to work in browser. I thought some key files might be lost, so i copied '/src', '/template', 'index.js' into the package folder, just got the same error of Can't resolve 'crypto', 'fs', 'path' when i run from "generateContainer" in index.js So is it possible to use this package in a react or an angular project for browser? |
hi @ronanjia ! |
Thank you so much for your advice, it really would help! |
Guys, I am extremely sorry about turning a blind eye towards this much requested feature for so long, I was so occupied with other things, that I wasn't able to put in any time on this and get this feature out, but today I did spend some time and it seems like there's some issue that I am facing with |
@ronanjia Thanks a lot for posting this, it helped me find that this happens only when you try installing with npm and not yarn. Could you please try with yarn and post the result here?
or
|
Finally released a new version which contains the changes for browser support, even though it doesn't have support for direct usage using script tag, but it does work with React, so yay. :D Closing this issue. |
@privateOmega i got the project have to target ES2015 then it will work. |
As a workaround, you can use |
could you check please this error with doc/docx? |
Searched NPM and found this project. Tried in browser but gives me error about fs. Is this project for node only or I miss some settings...
The text was updated successfully, but these errors were encountered: