-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
BUILD.bazel
65 lines (60 loc) · 1.51 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin", "js_library", "nodejs_binary")
load("@npm//@bazel/typescript:index.bzl", "ts_project")
package(default_visibility = ["//visibility:public"])
js_library(
name = "integration_lib",
package_name = "qwik_integration",
srcs = ["package.json"],
deps = [
":integration",
],
)
ts_project(
name = "integration",
srcs = glob(
[
"**/*.ts",
"**/*.d.ts",
"**/*.tsx",
],
exclude = [
"**/*.unit.ts",
"**/*.unit.tsx",
],
),
declaration = True,
tsconfig = "//:tsconfig",
deps = [
"//src/core",
],
)
copy_to_bin(
name = "static_files",
srcs = glob([
"**/*.html",
"**/*.css",
]),
)
nodejs_binary(
name = "server",
data = [
":integration_lib",
":static_files",
"//src:qwikloader",
"//src:qwikloader.min",
# The next two lines are duplicates and should be unifed somehow.
"//src/core", # This is needed so that `import '@builder.io/qwik'` works
"//src:core.js", # This is needed so that server can serve '@builder.io/qwik` as single file.
"//src/server",
"@npm//domino",
],
entry_point = "//src/server:main.js",
templated_args = [
"--node_options=--experimental-modules",
"--nobazel_patch_module_resolver",
"--root",
"qwik/src",
"qwik/src/core",
"qwik/integration",
],
)