这些是原始的javascript文件
aaa.js
bbb.js
ccc.js
使用webpack,我将这3个javascript文件编译成
bundle.js
这是另一个javascript文件
front.js
现在如何在front.js中访问aaa.js的变量? 我在html文件中只导入了bundle.js和front.js,我想在front.js中访问aaa.js的变量。
示例代码)
aaa.js
var service=function(){
var pathname = window.location.pathname;
}
module.exports = service;
front.js
console.log(pathname)