Answer the question
In order to leave comments, you need to log in
How crazy is this decision?
I decided to experiment and include a third-party js file into the main js file without exports: eval(fs.readFileSync(__dirname + '/foo.js') + '');
The output suits me, but:
1) Does anyone actually do this?
2) What are the disadvantages of such a solution?
Answer the question
In order to leave comments, you need to log in
By the looks of it, you're solving your architectural problems through muddy hacks. You can of course, but this is not a solution.
If the module is large and does too much, break it up into smaller ones, make one a facade, and it will simply contain a set of submodules. You instantiate others inside and forward calls to them.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question