Skip to content
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

Support More/All ESBuild options #7697

Closed
HenrySkup opened this issue Sep 15, 2020 · 5 comments
Closed

Support More/All ESBuild options #7697

HenrySkup opened this issue Sep 15, 2020 · 5 comments

Comments

@HenrySkup
Copy link

Hi, ran across an issue trying to import an .svg and then have ESBuild resolve the import. (I'm. getting : File extension not supported: ../logo.svg).

As per this issue this should be possible if you are able to specify the loader option.

From the Hugo docs, it is not clear how to specify this. Could we map the options dict to the flag names to be able to access all the options?

Full list of options

@shafiemukhre
Copy link

@bep Is there a way to access all other ESBuild options? It is not clear to me as well from the Hugo documentation. For example I want to access JSX factory and JSX fragment options in order for to use Preact inside Hugo, however I do not know to how to add this options in Hugo. Is this possible?

@shafiemukhre
Copy link

I solved this (only for ESBuild options to use Preact) after looking at this question on discourse: https://discourse.gohugo.io/t/javascript-build-jsx-factory/30268

JSXFactory and JSXFragment options are supported in the source code, however it was not mentioned in Hugo JavaScript Building documentation page. Should I make a pull request to update this page: https://gohugo.io/hugo-pipes/js?

I also created a minimal example of using Preact in Hugo with ESBuild, here is the public repo: github.com/shafiemukhre/preact-hugo-esbuild

@bep
Copy link
Member

bep commented Apr 20, 2021

Building documentation page. Should I make a pull request to update this page:

@shafiemukhre Yes, please. but please do it in the docs repo.

As to adding "all options": ESBuild is evolving fast and he is adding options all the time; most option need some thinking on the Hugo side, so adding one option isn't cost free (at its minimal we need to update the documentation).

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@github-actions
Copy link

github-actions bot commented Jun 4, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants