From 78f227b664d86c30fbb25f7a953b7ef8f2dacf13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 13 Nov 2020 08:54:29 +0100 Subject: js: Let ESBuild handle all imports from node_modules This commit fixes some issues where modules in /assets share the same name as in node_modules. This was not intended, and with this commit the node_modules-components should be isolated. If you want to redefine something inside node_modules, use the `defines` option. Fixes #7948 --- hugolib/site.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hugolib/site.go') diff --git a/hugolib/site.go b/hugolib/site.go index 3679e354c..3d77b014a 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -1047,7 +1047,7 @@ func (s *Site) processPartial(config *BuildCfg, init func(config *BuildCfg) erro ) for _, ev := range events { - if assetsFilename := s.BaseFs.Assets.MakePathRelative(ev.Name); assetsFilename != "" { + if assetsFilename, _ := s.BaseFs.Assets.MakePathRelative(ev.Name); assetsFilename != "" { cachePartitions = append(cachePartitions, resources.ResourceKeyPartitions(assetsFilename)...) if evictCSSRe == nil { if cssFileRe.MatchString(assetsFilename) || cssConfigRe.MatchString(assetsFilename) { -- cgit v1.2.3