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
External relative paths should be resolved relative to the output dir #3141
Comments
Not sure about this, but I would be open to more opinions here. At the moment, you should be able to fix that manually via output.paths. |
Also note that when using the JS API, |
I have an external library that needs to be imported in two files where I am using code splitting, for the sake of organization the chunks are being rendered in two different folders, my project structure looks something like this:
In the example above both For the time being I wrote a small plugin that hooks
but that only works if the entry point of the chunk is importing the file, otherwise it would be impossible to compute the proper relative path to I think that the best solution would be to add |
Currently (as of 1.22.0), if you have an input file
src/foo/foo.js
that imports"../../dep"
(marked as external in the configuration), and you have rollup bundle it intodist/foo.js
, the output file, that file will also reference../../dep
, though that means a different thing from its directory than it did from the source file's directory. So that file will generally fail to run.Would it make sense to have the library re-resolve external relative paths relative to the output directory?
The text was updated successfully, but these errors were encountered: