Replies: 2 comments
-
MaybeLocal<Value> loadenv_ret = node::LoadEnvironment(
env,
"const publicRequire ="
" require('module').createRequire(process.cwd() + '/');"
"globalThis.require = publicRequire;"
"require('vm').runInThisContext(process.argv[1]);"
"publicRequire('D:/workspace/project/jstTest/Release/ejs.js');"
); 请问怎么加载js文件 |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can load your |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Affected URL(s)
c++ nodejs
Description of the problem
Integrate nodejs in c++ applications. How can I load external JS files to global objects? It is the same as path and FS libraries. Thank you
Beta Was this translation helpful? Give feedback.
All reactions