summaryrefslogtreecommitdiffstats
path: root/hugolib/site.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-11-13 08:54:29 +0100
committerGitHub <noreply@github.com>2020-11-13 08:54:29 +0100
commit78f227b664d86c30fbb25f7a953b7ef8f2dacf13 (patch)
tree20c298b724513402830072a4d6768e6642851689 /hugolib/site.go
parent5e03f644a4507f51bdbcdb42b65ce4e99095374f (diff)
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
Diffstat (limited to 'hugolib/site.go')
-rw-r--r--hugolib/site.go2
1 files changed, 1 insertions, 1 deletions
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) {