Refactoring old JS. Migrate from legacy JS to webpack. Do I even need bundler or stay vanila JS?

69 Views Asked by At

For example, I have files: /js/common.js and /js/jqextend.js. Most of legacy JS files have such architechture:

;var common = (function() {
    functionName = function () {
        
    }
    
})();

So, is it better migrate to webpack or stay like this?

If I'll use webpack, I need somehow use it with the old js, without modules, exports, etc. So, do I need add support import/export for all my JS? It looks like unrealistic for me, because there are about 50-100 JS files and changing all of them might take very long time.

0

There are 0 best solutions below