Skip to content

[esbuild] expose the platform option to bundle code run on node #13136

@razonyang

Description

@razonyang

Dear Hugo team, I'd like request a feature to specify the platform option of esbuild.

Backgrounds

There are many static site hosting platforms that support serverless functions (e.g. Cloudlfare Worker), it would be great if we could bundle JavaScript code that runs on node, which provides better integration capabilities.

With the esbuild platform option, Hugo can be a Node application packing tool.

Pros

  1. It's easy to manage, share, and reuse codes between sites through Hugo Modules.
  2. Manage configuration in the same place (hugo.yaml and the params option of js.Build).

I am willing to implement it (I have a working local branch) if this request is accepted.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions