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.
Asked
Active
Viewed 69 times
1 Answers
0
Ran into the same issue and solved it using webpack 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;

Dylan Crombie
- 11
- 4