question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update the SDK to export an actual ES2015 module

See original GitHub issue

PRs welcome!

Currently the library is exported in such a way that you can only use require('geofire') within Node.js. This means you cannot get require('geofire') or import * as GeoFire from 'geofire' to work with ES2015-compatible browsers or browser bundlers like webpack and Browserify. We should export an actual ES2015 module to support those modern use-cases.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
RedFourcommented, Sep 29, 2016

I’m been looking for how to integrate GeoFire to my Angular 2 project. My project is created using the angular-cli which uses webpack. Does this issue mean I can’t import GeoFire right now?

2reactions
jwngrcommented, Sep 29, 2016

You can include it the “old-fashioned” way. That is, just include a <script> tag for the GeoFire library in your main HTML file and use the global GeoFire object that it creates.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ES2015 module syntax is preferred over custom TypeScript ...
If you find the rule useful and want to keep it, then you'll need to modify your code to use import and export...
Read more >
babel-plugin-transform-es2015-modules-commonjs
This plugin transforms ES2015 modules to CommonJS. ... but you can use babel-plugin-add-module-exports, so that updating to ... value: true.
Read more >
Upgrade your Node app: From CommonJS to ES Modules
1) Prepare your code · 2) Update the package.json · 3) Convert all imports and exports · 4) Fix imports and exports ·...
Read more >
JavaScript modules - MDN Web Docs
Exporting module features​​ The first thing you do to get access to module features is export them. This is done using the export...
Read more >
ES6 Modules and How to Use Import and Export in ...
The ES2015 (ES6) edition of the JavaScript standard gives us native support for modules with the import and export syntax.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found