all: Run modernize -fix ./...

This commit is contained in:
Bjørn Erik Pedersen
2025-02-26 10:15:04 +01:00
parent b7ae24b9c2
commit 521911a576
141 changed files with 302 additions and 354 deletions

View File

@@ -27,6 +27,7 @@ import (
"github.com/gohugoio/hugo/resources"
"github.com/gohugoio/hugo/resources/resource"
"github.com/spf13/afero"
"slices"
)
const (
@@ -167,15 +168,11 @@ func createBuildPlugins(rs *resources.Spec, assetsResolver *fsResolver, depsMana
}
}
for _, ext := range opts.Externals {
// ESBuild will do a more thorough check for packages resolved in node_modules,
// but we need to make sure that we don't try to resolve these in the /assets folder.
if ext == impPath {
return api.OnResolveResult{
Path: impPath,
External: true,
}, nil
}
if slices.Contains(opts.Externals, impPath) {
return api.OnResolveResult{
Path: impPath,
External: true,
}, nil
}
if opts.ImportOnResolveFunc != nil {