-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
Milestone
Description
This is in regards to the following discussion:
https://discourse.gohugo.io/t/esbuild-looks-like-we-can-finally-get-solid-hugo-modules-support/28757/12?u=utkarshverma
In short, ESBuild doesn't recognize index.esm.js
by default, and hence one has to specify an additional export explicitly as such:
imports:
- path: github.com/twbs/bootstrap
mounts:
- source: scss
target: assets/scss/bootstrap
- source: js
target: assets/bootstrap
- source: js/index.esm.js
target: assets/bootstrap/index.js
As npm
handles this by default, it would be nice to have this with the ESBuild implementation in Hugo as well. Apart from that, ESBuild modules being relatively new, it took me some time to figure out that an explicit mount for index.esm.js
was needed.