2021-03-20 05:56:08 +01:00
|
|
|
load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary")
|
2021-03-20 14:13:27 +01:00
|
|
|
load("@npm//@bazel/typescript:index.bzl", "ts_library")
|
|
|
|
|
|
|
|
_deps = [
|
|
|
|
"@npm//@bazel/worker",
|
|
|
|
"@npm//sass",
|
|
|
|
"@npm//svelte",
|
|
|
|
"@npm//svelte-preprocess",
|
|
|
|
"@npm//svelte2tsx",
|
|
|
|
"@npm//typescript",
|
2021-03-21 06:45:15 +01:00
|
|
|
"@npm//@types/node",
|
2021-03-20 14:13:27 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
ts_library(
|
|
|
|
name = "svelte_bin_ts",
|
|
|
|
srcs = ["svelte.ts"],
|
|
|
|
deps = _deps,
|
|
|
|
)
|
2021-03-20 05:56:08 +01:00
|
|
|
|
|
|
|
nodejs_binary(
|
2021-03-20 11:42:29 +01:00
|
|
|
name = "svelte_bin",
|
2021-03-20 14:13:27 +01:00
|
|
|
data = ["svelte_bin_ts"] + _deps,
|
|
|
|
entry_point = ":svelte.ts",
|
2021-03-21 05:12:00 +01:00
|
|
|
# should fix .js files being not found on subsequent worker requests
|
|
|
|
templated_args = ["--bazel_patch_module_resolver"],
|
2021-03-20 05:56:08 +01:00
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|