fix(build): correctly generate module dependencies for custom build

Closes #100