Open jeffmay opened 10 years ago
amdloader path should be relative to reference file and not outDir
Agreed.
it would be simple enough to allow the user to specify the root path of the AMD loader
If you want to. I have name suggestion though, call it baseUrl
since that is what requirejs uses.
If you have a project like so:
then when you attempt to compile them both into the same directory with an AMD loader...
the outDir is "target/js" so the paths in amdloader are all set to "./../main.js" instead of "./main.js".
We should think about how we want to handle multiple reference files in a project. Maybe a separate ticket for this?
In this case, it would be simple enough to allow the user to specify the root path of the AMD loader (configuration is always a good option since people -- like myself -- always have exotic needs).
Alongside this though, I think we could more wisely default to using the path to reference file's directory appended with references (and then normalize the paths?)
@basarat what do you think?