1

I am new to typescript and facing this issue , the answer to this question is perfectly given in another question but i have no clue how to do this in web pack because the solution provided to that answer was of System.config.js and i an not having it in my project. here is the link to that question if one can solve the System.config.js part.

Using GeoFire in an Angular2 App

Community
  • 1
  • 1
Aashir Javed
  • 101
  • 1
  • 15

1 Answers1

0

Ran into the same issue and solved it using webpack expose loader:

Expose Loader

First add this to your bundle (vendor.ts):

require("expose?GeoFire!geofire");

Then add this to your loaders in webpack.config.js:

module: {
  loaders: [
    { test: require.resolve('geofire'), loader: 'expose?GeoFire' }
  ]
}

Finally in your Component:

declare var GeoFire: any;