-
Notifications
You must be signed in to change notification settings - Fork 21
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
esbuild-plugin-html does not use the original directory of the source file #128
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hello @maartenst! Thanks for reporting! The issue should be resolved in the latest version of the plugin. If you still notice any problems, feel free to reopen the issue. |
Hi @edoardocavazza ,unfortunately it does not seem to work yet; I do see directories being created e.g. within 'dynamic_pages' but I still only have one resulting html file in the root of the dist dir, so it seems like the files aren't using the directory they are read from as a target to write to but just overwrite the one in the root of the dist target dir. Also I can't reopen this issue, can you or should I create a new one? |
any progress on this? |
Hi @maartenst, I am sorry for the delay, I really wanted to fix this but haven't time yet. It would be very helpful for me to have a reproduction repository to test out 🙏 |
ok, I'll create one as soon as I have time, sometime this week probably, thanks! |
I am seeing the same problem. If my entrypoints are |
@edoardocavazza Looking at https://github.com/chialab/rna/pull/136/files#diff-c6783ff3262b589fcafddcb8136b1887bc87e55d9d36e39f91ff73479bd2d09aR122 I'm not sure why you removed |
Ah, nevermind. This was caused by user-error. My configuration was missing: @maartenst maybe you had the same problem? |
I'm trying to use esbuild-plugin-html with the esbuild-plugin-glob plugin to use it with several html files, like this:
[ "pages/**/*.html", "dynamic_pages/**/*.html"];
This breaks as the code now just uses the filename and not the directory. I hacked it to work by changing the creation of the finalOutputFile const in the index.js around line 28595 to this:
const finalOutputFile = `${workingDir}/${outDir}/${inputs[0]}`;
I'm not making a PR as I have a hard time understanding the original way of setting the path and what else in the code it affects but maybe you can have a look and adjust it so it does take the path into account?
The text was updated successfully, but these errors were encountered: