Update the SDK to export an actual ES2015 module
See original GitHub issuePRs 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:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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?
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 globalGeoFire
object that it creates.