-
Notifications
You must be signed in to change notification settings - Fork 26
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
Replace sub-module's relative require #48
Comments
I was able to get it to work by using the exact require input as the key: .transform("aliasify", { global:true, aliases:{ "./utf8": "utf8-typed" }}) which is unsafe as any dependency could have such a require argument. |
Solving this would likely require the use of |
Dead project? |
Well, not a lively project. :) But I get way too many emails from github and unfortunately it's easy for issues from less-lively projects to slip through the cracks. So, you're trying to make it so when whatwg-url tries to internally import "./lib/utf8" (or some variation on that), you want to replace this with We do support "options" for the right hand side of aliases: {
"d3": {"relative": "./shims/d3.js"}
} |
(Hit enter too soon) So if you can solve this with aliases: {
"whatwg-url/lib/utf8": {replacement: "utf8-typed", resolve: true}
} (Maybe you can come up with a better name than Sound reasonable? |
Sounds reasonable. |
I've even tried using the full path as the key:
The file that I'm trying to alias is, by default, required internally with
require("./utf8")
.Instead, the above aliases function as if being ignored.
The text was updated successfully, but these errors were encountered: