Ionic2 Build with webpack

Hi All,

I have an Ionic 2 app. I have been following this tutorial, which adds a webpack. If I’m honest, I don’t really understand it.

However, now I have a problem that it calls a ts file twice, which causes errors.

Error: There is already a collection named "chats"

Please have a look at the following for more details. If you look at the Dev Tools image, you can see there are two instances of collections.ts.

How can I fix this, so that collections.ts only gets invoked once?

Thanks

I would recommend you to wait for the official support of Webpack 2 in Ionic 2 (see Build Process Improvements).