0

I have been trying to migrate a big app(more than 50kloc legacy code)to webpack from requirejs. since it is very old code I have so may global function decalred in one module that I need to use in some other modules. Mostly I am trying to achieve this without any code change, I don't want to touch the code since it is having many functions like these. any idea?

I have file a.js and b.js

//b.js
//so many global function like this in many files. And these are used in many files also
function globalFunc(){
}

//a.js
globalFunc();

The a.js and b.js are two diff bundle js from weback, and while running the app I am getting globalFunc is not defined

RRR
  • 3,509
  • 4
  • 29
  • 38

0 Answers0