Closed kilinkis closed 5 years ago
Hi @kilinkis,
I guess this is because it's meant to be used in node and not in the front end. But it can probably be optimised a little. Like it's only using three methods of lodash and still imports *
You're correct here on both counts.
This library was not designed to be used in the browser. Especially because placing your secret key in your JS bundle would expose it to everyone! This is not good.
var clearbit = require('clearbit')('sk_<redacted>'); // Don't do this
It wouldn't be a bad idea to trim down the giant lodash import and prune other unnecessary dependencies from this library.
You're right, for a moment I thought that was a public key.
Thanks for your answer @t-richards :) I guess you can close this issue now.
Hi guys,
I did a very basic integration using this API but the size of the bundle is too big, I think because of the dependencies. See the following screenshot and below it, my package.json file:
is there anything I can do to decrease the size?
my script is just a js with this example from the docs:
I guess this is because it's meant to be used in node and not in the front end. But it can probably be optimised a little. Like it's only using three methods of lodash and still imports *