aboutsummaryrefslogtreecommitdiffstats
path: root/webui/pack_webui.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-08-14 02:06:41 +0200
committerMichael Muré <batolettre@gmail.com>2018-08-14 02:06:41 +0200
commit43f808a0e263ada899acb5cc523cfcab6d07c20d (patch)
treeeb019f77fb2111d7c31fc5dcd2a10fe6b7c7ceef /webui/pack_webui.go
parent5edcb6c8bd430af4c26567d19c388d4c3e30b681 (diff)
downloadgit-bug-43f808a0e263ada899acb5cc523cfcab6d07c20d.tar.gz
webui: don't pack the huge .map file for production
Diffstat (limited to 'webui/pack_webui.go')
-rw-r--r--webui/pack_webui.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/webui/pack_webui.go b/webui/pack_webui.go
index bbddeb70..3eff71a5 100644
--- a/webui/pack_webui.go
+++ b/webui/pack_webui.go
@@ -9,13 +9,19 @@ import (
"os"
"path/filepath"
+ "github.com/shurcooL/httpfs/filter"
"github.com/shurcooL/vfsgen"
)
func main() {
var cwd, _ = os.Getwd()
- webUIAssets := http.Dir(filepath.Join(cwd, "webui/build"))
+ webUIAssets := filter.Skip(
+ http.Dir(filepath.Join(cwd, "webui/build")),
+ func(path string, fi os.FileInfo) bool {
+ return filter.FilesWithExtensions(".map")(path, fi)
+ },
+ )
fmt.Println("Packing Web UI files ...")