-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import does not work correctly #31120
Comments
maybe related nodejs/modules#458 |
cc @nodejs/modules-active-members |
Node's esm loader does not support loading from http(s) urls currently. We likely could offer a better error message though. |
it appears that it was turned into a file path without verifying that the scheme was |
Wow ok so i will need a special import helper that does fetch eval thanks for pointing that out. |
can some one point me to a similar code example that implaments import? var m = require('module')
var src = 'module.exports = 42'
var res = require('vm').runInThisContext(m.wrap(src))(exports, require, module, __filename, __dirname)
console.log(module.exports) |
If you're looking to use |
can be closed i have writen the universal loader of my dreams :) |
@GeoffreyBooth |
node v13.2.0
examples
dynamic also but diffrent error
it looks like he stripps the http domain part and only uses path maybe i need to define a base url or what happens there?
The text was updated successfully, but these errors were encountered: