标签: javascript browserify commonjs
require('xyz.js')
答案 0 :(得分:0)
require()
xyz.js:
window.myExport = "hello";
main.js:
var xyz = require("xyz"); xyz.myExport; // undefined window.myExport; // "hello"