WebPack creating two instances

Hi All,

I am following this tutorial, which has it’s own webpack. When I use this it loads a collections.ts file for each import of that collection. Is this normal behavior?

My problem is that in collections.ts I have a constant of a Mongo Collection object. Creating more than one causes an error.

Uncaught Error: There is already a collection named "chats"