diff --git a/examples/nestjs/src/BUILD.bazel b/examples/nestjs/src/BUILD.bazel index 34027a69ad..2f1ad531f7 100644 --- a/examples/nestjs/src/BUILD.bazel +++ b/examples/nestjs/src/BUILD.bazel @@ -15,17 +15,18 @@ load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary") load("@io_bazel_rules_docker//nodejs:image.bzl", "nodejs_image") load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test") -load("@npm//@bazel/typescript:index.bzl", "ts_library") +load("@npm//@bazel/typescript:index.bzl", "ts_project") package(default_visibility = ["//visibility:public"]) -ts_library( +ts_project( name = "app", srcs = glob( ["*.ts"], exclude = ["*.spec.ts"], ), - module_name = "examples_nestjs", + declaration = True, + tsconfig = "//:tsconfig.json", deps = [ "@npm//@nestjs/common", "@npm//@nestjs/core", @@ -35,9 +36,11 @@ ts_library( ], ) -ts_library( +ts_project( name = "test_lib", srcs = glob(["*.spec.ts"]), + declaration = True, + tsconfig = "//:tsconfig.json", deps = [ ":app", "@npm//@nestjs/common", diff --git a/examples/nestjs/tsconfig.json b/examples/nestjs/tsconfig.json index e69de29bb2..89e539bcb7 100644 --- a/examples/nestjs/tsconfig.json +++ b/examples/nestjs/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "experimentalDecorators": true, + "target": "ES2015", + "module": "commonjs", + "rootDirs": [".", "bazel-out/k8-fastbuild/bin", "bazel-out/darwin-fastbuild/bin"], + "declaration": true + }, + "exclude": ["external"] +} \ No newline at end of file