Open ainthek opened 7 years ago
This module is not intended to enhance or replace node's built-in require functionality. Therefore, you'll never be able to execute source code directly if it contains our alternative syntax. What you could do however, is use browserify similar to how you'd use it to build for the browser, but use the --node option to build your bundle for the server instead. That should give you a bundle that's executable in node
I may have missed something, I want my original code to ALWAYS run in node and sometimes in browser. But when i use require(glob) syntax it brakes node API and code will not run in node of course. How is this module to be used in pure node environment ? We need both.