私はaurelia-cliを使って私の資産を束ねます。必要なモジュールはrequirejsによって処理されます。firebase js version> 3.6.3 aurelia-cliとのバンドル
firebase使用するには、私は、特にファイルfirebase-browser.jsをバンドル:
// aurelia.json
[...]
{
"name": "firebase",
"path": "../node_modules/firebase/",
"main": "firebase-browser"
}
予想通りfirebase NPMパッケージのバージョン3.6.2まではすべてが動作します。しかし、次のエラーのバージョン3.6.3からブラウザで発生します。
ReferenceError: global is not defined
問題が発生バンドルの一部:
define('firebase/app',['require','exports','module'],function (require, exports, module) {var firebase = (function(){
// minified stuff
firebase.SDK_VERSION = "3.6.3";
return firebase;}).call(global); // <--- ERROR
module.exports = firebase;
firebaseのリリースノートは
を言います3.6.3: Changed the packaging of browser npm modules to fix an issue that occurred when using Firebase Storage with the Browserify and webpack module bundlers.
これを修正する方法はありますか?
Firebaseがロードされる前のどこか: 'window.global = window' – cartant
@cartant thats it!あなたが回答を投稿するなら、私はそれを受け入れるでしょう。 – kuechlerm
[公式チャンネル](https://firebase.google.com/support/)でバグや互換性の問題を報告し、解決できるようにしてください。 – Kato