This question has already been answered:
- Tell me the modular system js 1 answer
Writing many lines of code in one file is inconvenient at all. I read about different systems of modules, but they all can not work without any third-party libraries, server, collector or something else. ES6 modules are not supported in browsers yet .
If I want to write an application \ site \ page \ script \ etc and split the code into parts, then I can’t do without a server, third-party libraries that need more libraries, a project collector and other things?
I tried Browserify , but I need to run the build each time, or use gulp \ grunt for the same. Inconvenient.
Require.js does not require assembly, but I don’t like the code organization:
require(['deps/dep1', 'deps/dep2', 'deps/dep3', 'deps/dep4', 'deps/dep5', 'deps/dep6', 'deps/dep7'], function ( dep1, dep2, dep3, dep4, dep5, dep6, dep7) { return function () { return dep1 + dep2; }; }); How to implement a modular system in the most efficient way, without burdening yourself with unnecessary libraries?