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

Using with Webpack #43

Closed
Velua opened this issue Sep 20, 2017 · 4 comments
Closed

Using with Webpack #43

Velua opened this issue Sep 20, 2017 · 4 comments

Comments

@Velua
Copy link
Contributor

Velua commented Sep 20, 2017

Just a quick question, has anyone had any trouble using this package with webpack in use as well?

@Velua
Copy link
Contributor Author

Velua commented Sep 20, 2017

Can close cuz this questions super ambiguous

@maxkoryukov
Copy link
Contributor

maxkoryukov commented Sep 20, 2017

Probably, there shouldn't be any issues caused by any transpiler/packer. But need to check, whether Freshdesk itself allows cross-origin requests (CORS).

If CORS is forbidden on Freshdesk, then it is not possible to use this package from a browser (probably).

If CORS is allowed, we could try to check the following popular tools for compatibility:

  • webpack
  • browserify
  • babel (with any of next configs)
  • ??? something more?

The best approach - write simple tests, or create a simple web-page to use

@Velua
Copy link
Contributor Author

Velua commented Nov 7, 2017

Solved!

Was able to fix by adding this in my webpack config...
Freshdesk does support CORS.

webpackConfig.node = { 
  console: true,
  fs: 'empty',
  net: 'empty',
  tls: 'empty'
}

@Velua Velua closed this as completed Nov 7, 2017
@maxkoryukov
Copy link
Contributor

@Velua , added to readme. for now - without any changes

https://github.com/arjunkomath/node-freshdesk-api#use-with-webpack

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

No branches or pull requests

2 participants