I am trying to use babel.transforminstead JSXTranformerfor the reaction.
...
ScriptEngineManager mgr = new ScriptEngineManager();
ScriptEngine nashorn = mgr.getEngineByName("nashorn");
nashorn.eval("var process = {env:{}}");
nashorn.eval(getScript("com/facebook/babel/jvm-npm.js"));
babel = (JSObject) nashorn.eval("require('babel');");
...
Babylon and babel-core are installed as global node modules, and I have an error:
Testsuite: com.my.app.BabelTransformerTest
Cannot find the module. / lib / api / node.js
Unable to load module babel-core LOAD_ERROR
Unable to load module babel LOAD_ERROR
Unable to load module babel-core LOAD_ERROR
Unable to load module babel LOAD_ERROR
Unable to find module. / lib / api / node.js
Unable to load babel-core module LOAD_ERROR
Unable to load babel-LOAD_ERROR module
./lib/api/node.js is in C:\Users\***\AppData\Roaming\npm\node_modules
I heard that you can run babel.transformfrom Nashorn?
, babel JavaScript?