mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Make js.Build fully support modules
Fixes #7816 Fixes #7777 Fixes #7916
This commit is contained in:
@@ -37,6 +37,7 @@ import (
|
||||
const (
|
||||
metaKeyFilename = "filename"
|
||||
|
||||
metaKeySourceRoot = "sourceRoot"
|
||||
metaKeyBaseDir = "baseDir" // Abs base directory of source file.
|
||||
metaKeyMountRoot = "mountRoot"
|
||||
metaKeyModule = "module"
|
||||
@@ -128,6 +129,10 @@ func (f FileMeta) PathFile() string {
|
||||
return strings.TrimPrefix(strings.TrimPrefix(f.Filename(), base), filepathSeparator)
|
||||
}
|
||||
|
||||
func (f FileMeta) SourceRoot() string {
|
||||
return f.stringV(metaKeySourceRoot)
|
||||
}
|
||||
|
||||
func (f FileMeta) MountRoot() string {
|
||||
return f.stringV(metaKeyMountRoot)
|
||||
}
|
||||
|
Reference in New Issue
Block a user