From e0124e4b1fded769ce7cd7a9a416c4e113a0087c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 25 Nov 2020 08:30:20 +0100 Subject: [PATCH] Update js.md --- content/en/hugo-pipes/js.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/en/hugo-pipes/js.md b/content/en/hugo-pipes/js.md index b858aa389..6b336624a 100644 --- a/content/en/hugo-pipes/js.md +++ b/content/en/hugo-pipes/js.md @@ -102,6 +102,8 @@ For other files (e.g. `JSON`, `CSS`) you need to use the relative path including import * as data from 'my/module/data.json'; ``` +Any imports not matching any component in `/assets` will be resolved by ESBuild with the **project directory** as the resolve directory (used as the starting point when looking for `node_modules` etc.). Also see [hugo mod npm pack](/commands/hugo_mod_npm_pack/). + Also note the new `params` option that can be passed from template to your JS files, e.g.: ```go-html-template