Use npm packages in server.go
server.go is updated to serve npm packages instead of bower components.
The updated server:
* returns files from node_modules directory if appropriate redirect
exists in redirects.json file
* patches some import statements in .js files
For example:
import "module/file" -> import "/node_modules/module/file"
The patch is required, because browsers doesn't know anything about
node_modules
Note: The file redirect.ts is not used in this change. It is added to
describe json schema here. In an upcoming change it is used to update
source code.
Change-Id: I2435e93e0faf5984b5ebec6ca18f930da01fa9cc
diff --git a/polygerrit-ui/BUILD b/polygerrit-ui/BUILD
index 1c685ab..901244a 100644
--- a/polygerrit-ui/BUILD
+++ b/polygerrit-ui/BUILD
@@ -56,7 +56,7 @@
srcs = ["server.go"],
data = [
":fonts.zip",
- "//polygerrit-ui/app:test_components.zip",
+ "@ui_npm//:node_modules",
],
deps = [
"@org_golang_x_tools//godoc/vfs/httpfs:go_default_library",