-
Notifications
You must be signed in to change notification settings - Fork 23
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
ES module support #4
Comments
@zwz did you manage to solve this? |
I am getting
@drbh any plans to make this an ES module with support for webpack ? |
@drbh here is perhaps some help https://www.sitepen.com/blog/getting-started-with-assemblyscript/ Here are my results on a 3K active user project that would love to get your benefit here |
@jimmykane @zwz thanks for pointing this out - I’ll look into a way to avoid those dependencies after the holidays. As for now I have a gist that loads wasm-flate in using a base64 string. This method is a bit hacky but is a possible workaround https://gist.github.com/drbh/24496aaa863b8faa549cd05cd939f587 Hopefully that helps in the mean time! |
Could you tell me how one could use this eg as a module or in Angular?
…On Wed, Dec 25, 2019 at 9:36 PM drbh ***@***.***> wrote:
@jimmykane <https://github.com/jimmykane> @zwz <https://github.com/zwz>
thanks for pointing this out - I’ll look into a way to avoid those
dependencies after the holidays.
As for now I have a gist that loads wasm-flate in using a base64 string.
This method is a bit hacky but is a possible workaround
https://gist.github.com/drbh/24496aaa863b8faa549cd05cd939f587
Hopefully that helps in the mean time!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4?email_source=notifications&email_token=AAJVX4YYWX6CAK7BZYUSRGLQ2O76FA5CNFSM4J4GWDBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHUTB6A#issuecomment-568930552>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVX4ZESYY4VMUUS3D6P63Q2O76FANCNFSM4J4GWDBA>
.
|
Hey @jimmykane based on the code above, your webpack is failing on the Loading the wasm file in this way is an artifact of I built and deployed a new version (1.0-beta) https://www.npmjs.com/package/wasm-flate/v/0.1.0-beta and you'll see the code no longer has I have not had the chance to test this in any application - but this will likely solve, or start to solve the issue you have. Hope this is helpful! Please let me know how it goes 😀 |
@drbh giving it a try today. Thank you so much. My app is based on decoding a gzip packet client side that can be up to 50mb. You cannot imagine how much it has been speeded up ! |
Worked like a charm. I had tried to compile this with another target as you instructed at my forked repo of this repo. There was a little error, related to Angular and async loading of WebAssembly. I leave this here for future reference in case people run to this issue
|
So the beta release you just did worked! Should be working for other TS/ES projects just fine. The above comment is only for angular |
I was trying wasm-flate by
import {deflate_encode_raw, deflate_decode_raw} from 'wasm-flate'
But it reports error when I visit the page related to wasm-flate
I guess it was caused by the line 22 in wasm-flate.js.
The text was updated successfully, but these errors were encountered: