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

How to use the package in Ionic2? #190

Closed
ChirsChan opened this issue Jul 19, 2017 · 6 comments
Closed

How to use the package in Ionic2? #190

ChirsChan opened this issue Jul 19, 2017 · 6 comments

Comments

@ChirsChan
Copy link

Hello,thank for your contribution,but after I install the package in my Ionic2 project,there is an error "cannot find module 'dns'",I spent two days trying fix it, could anybody give me some guide?

@gautamsi
Copy link
Owner

I have started working on ionic, will try to fix it for you.
basically it needs to be rebuilt, I have some working idea for making single files out of all the typescript file and then build the single js output. other approach would be to create some kind of environment like build where it would not ask dns module. XHR service needs to be written as well for ionic platform as this one heavily depends on nodejs

@ghost
Copy link

ghost commented Aug 24, 2017

Hi all, i have the same problem.
I'm trying to use the package in Ionic3 and when webpack compiles, there is the same error "cannot find module 'dns'".
Any news about that? I hope to fix this because your package looks awesome and i wanna use it in my projects

@gautamsi
Copy link
Owner

gautamsi commented Aug 25, 2017

looks like there were many requests for this. here it is then
try new module ews-js-api-browser

everything is same only the way it is packaged and the name of npm package is different. you can use any code targeted for nodejs using ews-javascript-api.

caveats

  • do not use StreamingSubscription feature, the browser based code is buggy, it keeps all streaming response in memory (all events) and emits when they are received as well as combines them at the end. If you really want to use Streaming Subscription, use it with 1 min timeout, large timeout may break the app due to memory issue if the mailbox has tons of changes going, for example mailbox migration using non-Exchange tools.
  • there is no AOT support, you will end up packaging 3mb file. uglify may break due to being large file.

let me know what error you face. Most errors in this one may be due to wrong sequence when I merged it to single file.

updates: I was able to run this through closure compiler service at http://closure-compiler.appspot.com/home
results:

mode gzip size uncompressed size has warning/error
original 386.93KB gzipped 2.84MB uncompressed --
White Space Optimization only 226.77KB gzipped 1.54MB uncompressed --
Saved 41.39% off the gzipped size 45.94% without gzip --
with simple Optimization 189.53KB gzipped 1.17MB uncompressed has warnings
Saved 51.02% off the gzipped size 58.73% without gzip --
with advanced optimization failed -- --

@prasanthmpr
Copy link

anyone have tested this api on ionic?

@gautamsi
Copy link
Owner

gautamsi commented Sep 3, 2017

@prasanthmpr I have not tested this with NTLM authentication if you are looking for that. I have tested few functions which are working as expected.

@gautamsi
Copy link
Owner

closing to keep issue list tidy. please re open if you need any help with this. you can create issue for any specific problem you face with ionic.

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