Skip to content

Add plugins solution to js.Build #8928

Closed

Description

@regisphilibert

While this is still in beta on esbuild front, this should be ready for production soon and should be on Hugo's radar as esbuild plugins will extend js.Build beyond jsx.

Think vue and svelte...

I'm not sure how this would work in a Hugo context, where settings are mostly strings, I understand passing parameters to the plugins will be complicated but maybe a simple list of strings matching the plugin package name could suffice? Like we currently have for PostCSS.

{{ $plugins := slice "esbuild-vue" }}
{{ $vueApp = resources.Get "js/app.vue" | js.Build (dict "plugins" $plugins)

OR for parameters.

{{ $plugins := dict 
"esbuild-vue" `{params}`
}}
{{ $vueApp = resources.Get "js/app.vue" | js.Build (dict "plugins" $plugins)

Activity

  1. changed the title [-]Add `plugins` solution js.Build[/-] [+]Add `plugins` solution to js.Build[/+] on Aug 25, 2021
  2. bep commented on Aug 25, 2021

    @bep
    Member

    Both Vue and Svelte plugins would require a JavaScript runtime (Node), which isn't possible/practical for Hugo.

  3. bep commented on Aug 25, 2021

    @bep
    Member

    Note, I'm not saying it's impossible -- but it's ... hard.

  4. regisphilibert commented on Aug 25, 2021

    @regisphilibert
    Author

    Ah too bad.

  5. github-actions commented on Jan 5, 2022

    @github-actions

    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.

  6. github-actions commented on Mar 12, 2022

    @github-actions

    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.

  7. locked as resolved and limited conversation to collaborators on Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions