Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
プレーンなものを使っているようです
exportsそれ以外のmodule.exports
exports
module.exports
ここのこの行で。
if (typeof exports !== 'undefined') { Backbone = exports;
ただし、このチュートリアルは使用されていることを示してmodule.exportsいます。
ブラウザのmoduleように考えてください。window実際には、それらは基本的に同じものです。
module
window
したがって、window.location === locationブラウザで実行される JavaScriptと同じ方法module.exports === exportsで、ノード環境で。
window.location === location
module.exports === exports