1

I work on a fairly large Javascript project (~863 files), where all the code is distributed in a modular way, being practically one file per class (object-oriented). Some things are loaded on the fly, when they are needed. But most are compiled into a single final file (relatively heavy).

For this great task, at the time I decided to use Require.JS, a library that has been abandoned today. For each file I have declared an alias (auto-generated with a script that I have created), so almost all the headers are of the type:

define([
   "SistemaJS2",
   , ... <other dependencies>
   , "VistaJS2"
],
function(
   SistemaJS2
   , ... <other dependencies>
   , VistaJS2
) {
});

As migrating this is a gigantic and conflictive task, I ask you for any similar experience, recommendation, etc. What would be the most comfortable, flexible, powerful way to use modules in 2024?

Thanks

I have tried a few guides in the past to move to Webpack, but it seems it is no longer as cool.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.