From 43f808a0e263ada899acb5cc523cfcab6d07c20d Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Tue, 14 Aug 2018 02:06:41 +0200 Subject: webui: don't pack the huge .map file for production --- webui/pack_webui.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'webui/pack_webui.go') 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 ...") -- cgit