load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary")
load("//ts:typescript.bzl", "typescript")

_deps = [
    "@npm//@bazel/worker",
    "@npm//@types/node",
    "@npm//sass",
    "@npm//svelte",
    "@npm//svelte-preprocess",
    "@npm//svelte2tsx",
    "@npm//typescript",
]

typescript(
    name = "svelte_worker_ts",
    srcs = ["svelte.ts"],
    deps = _deps,
)

nodejs_binary(
    name = "svelte_bin",
    data = [":svelte_worker_ts"] + _deps,
    entry_point = ":svelte.js",
    visibility = ["//visibility:public"],
)
