Closed melbarra88 closed 9 years ago
I am having the exact same issue. There is a bug with configDir option here.
b.transform(aliasify.configure({
aliases: expandedAliases
, configDir: pattern.cwd
}))
If I change it to
b.transform(aliasify.configure({
aliases: expandedAliases
}))
everything works fine. I am not sure the reason for adding that parameter.
v2 was just released. Please give that a try and see if that solves your issue!
@taylorhakes @melbarra88 have either of you had the chance to try v2?
v2 solved the above issue, but introduced a new issue with transforms. I am using remapify with babelify (for ES6 code) and it is not running the transform on the remapified files. It is throwing errors on all my ES6 code.
Edit: I will try to figure out the cause when I have some time. I will have to stick with v1 for the time being.
@joeybaker, I am sorry for not having had time to give you a feedback. I have tested V2, and it works very well for me. Thank you.
Cool. Closing then :)
Hi, I am facing some troubles using remapify with grunt from a folder different from my src folder. I have a root folder where I put all my build files. This root folder is structured as follows :
What I am trying to do is to aliasify file.js with simply "ui/file.js" and generate a bundled file in the build folder. Here is my grunt remapify configuration :
However aliasify is replacing my alias ui\file.js with ./....\src\js\src\ui\file.js and that causes my build process to stop because browserify doesn't find this file. By debugging remapify and aliasify, I found the source of the problem.
the variable configDir is equal to my cwd, which is not my config dir. I managed to temporarily resolve the problem by initializing aliasify with process.cwd() instead of pattern.cwd here :
Do you have a more clean way to resolve this issue? Thank you.
PS. I really like this library. I think it's very useful and I am willing to contribute.