Level/classic-level

Specify a custom prebuilds location

Closed this issue · 2 comments

My application is bundled for production use without node_modules installed. Currently classic-level looks for the binaries either in node_modules or in ./prebuilds (as far as I know). It would be nice to be able to specify a custom path upon initialization (e.g. as a config option).

That's possible if we lazily require() the binding. But I'm not sure it's worth it, because an (IMO) reasonable workaround already exists (copying to ./node_modules/classic-level/prebuilds or to ./prebuilds). Either way the prebuilds have to live somewhere on disk, so why not there?