Skip to content

Require node modules from Opal #19

@wied03

Description

@wied03

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_function

This 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).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions