forked from zetachang/opalrb-loader
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Milestone
Description
Currently, you cannot require node modules from Opal without using back ticks or JS syntax. (see Requires under README).
What would also need to happen, is to monkey patch the Opal compiler to allow the following:
some_module = require_node 'something'
some_module.js_functionThis would be a variant of the call node. That would under the hood become a webpack require that gets assigned to the some_module variable and Opal would not try to find it as an Opal module. It could even do the JS syntax under the hood so that you can call methods, etc. on it easily (see 2nd line above).
Reactions are currently unavailable