Monorepo
If your app lives inside a monorepo (for example managed by lerna), you should consider creating core package to handle configuration and model definition. All packages using models should then depend on the core package.
This is an example of lerna package structure
#
DependenciesMake sure that both episode-loader
and stats-loader
depend on the core
. This would be packages/episode-loader/package.json
#
Requiring modelsThis could be body of the packages/episode-loader/index.js