1
私は開発時にブラウザにGoogleクロージャモジュールをロードするだけで、高度なコンパイルは必要ありません。Google closure base.js&modules
私のindex.jsが含まれています
goog.module("Widgets.index");
var Widgets$app = goog.require("Widgets.app");
/* rest of the code */
を私のindex.htmlには、次のものが含まれています
<script src="closure/base.js"></script>
<script src="index.js"></script>
私は私のコンソールで、次を得る:
Module Widgets.index has been loaded incorrectly.
Note, modules cannot be loaded as normal scripts.
They require some kind of pre-processing step
私はどのようにindex.jsを前処理しますか? 私はちょうど私のブラウザでいくつかの簡単なGoogleモジュールをロードしたい、これは開発時間です。