11load ("@build_bazel_rules_nodejs//:index.bzl" , "js_library" )
2- load ("@npm//@bazel/typescript:index.bzl" , "ts_project " , "ts_config " )
2+ load ("@npm//@bazel/typescript:index.bzl" , "ts_config " , "ts_project " )
33load ("@npm//@bazel/esbuild:index.bzl" , "esbuild" )
44load ("@rules_pkg//pkg:mappings.bzl" , "pkg_filegroup" , "pkg_files" )
55
@@ -13,68 +13,68 @@ genrule(
1313
1414# Treat wasm_exec and types as a library.
1515js_library (
16- name = "wasm_exec" ,
17- srcs = [
18- ": wasm_exec.js " ,
19- " wasm_exec.d.ts " ,
20- ],
16+ name = "wasm_exec" ,
17+ srcs = [
18+ " wasm_exec.d.ts " ,
19+ ": wasm_exec.js " ,
20+ ],
2121)
2222
2323ts_project (
2424 name = "app" ,
2525 srcs = ["app.ts" ],
26+ declaration = True ,
2627 deps = [
27- ":wasm_exec" ,
28- "@npm//@types/chrome: chrome" ,
28+ ":wasm_exec" ,
29+ "@npm//@types/chrome" ,
2930 ],
30- declaration = True ,
3131)
3232
3333ts_project (
3434 name = "background" ,
3535 srcs = ["background.ts" ],
36+ declaration = True ,
3637 deps = [
37- ":app" ,
38- "@npm//@types/chrome: chrome" ,
38+ ":app" ,
39+ "@npm//@types/chrome" ,
3940 ],
40- declaration = True ,
4141)
4242
4343esbuild (
44- name = "background-bundle" ,
45- entry_point = "background.ts" ,
46- deps = [":background" ],
44+ name = "background-bundle" ,
45+ entry_point = "background.ts" ,
46+ deps = [":background" ],
4747)
4848
4949ts_project (
5050 name = "options" ,
5151 srcs = ["options.ts" ],
52+ declaration = True ,
5253 deps = [
53- ":app" ,
54- "@npm//@types/chrome: chrome" ,
54+ ":app" ,
55+ "@npm//@types/chrome" ,
5556 ],
56- declaration = True ,
5757)
5858
5959# See https://esbuild.github.io/content-types/#typescript-caveats for additional
6060# settings that we tweak in tsconfig.json. Specifically:
6161# isolatedModules = true
6262# esModuleInterop = true
6363esbuild (
64- name = "options-bundle" ,
65- entry_point = "options.ts" ,
66- deps = [":options" ],
64+ name = "options-bundle" ,
65+ entry_point = "options.ts" ,
66+ deps = [":options" ],
6767)
6868
6969filegroup (
7070 name = "optionsui" ,
7171 srcs = [
72- ":background-bundle.js" ,
73- ":background-bundle.js.map" ,
7472 "options.html" ,
75- ":options-bundle.js" ,
76- ":options-bundle.js.map" ,
7773 "style.css" ,
74+ ":background-bundle.js" ,
75+ ":background-bundle.js.map" ,
76+ ":options-bundle.js" ,
77+ ":options-bundle.js.map" ,
7878 ],
7979 visibility = ["//visibility:public" ],
8080)
0 commit comments