diff --git a/examples/data/BUILD.bazel b/examples/data/BUILD.bazel index 6ea5e72e..942080fb 100644 --- a/examples/data/BUILD.bazel +++ b/examples/data/BUILD.bazel @@ -1,5 +1,5 @@ load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin") -load("//:index.bzl", "prerender_pages", "web_resources_devserver") +load("//:index.bzl", prerender_pages = "prerender_pages2", "web_resources_devserver") load("//tools/jasmine:defs.bzl", "jasmine_web_test_suite") load("//tools/typescript:defs.bzl", "ts_project") @@ -10,21 +10,25 @@ copy_to_bin( prerender_pages( name = "site", - src = "site.tsx", - tsconfig = "//:tsconfig", - source_map = True, + entry_point = "./site.js", + prerender = ":prerender", + bundle_js = False, # Optimization: No client-side JavaScript on this site. +) + +ts_project( + name = "prerender", + srcs = ["site.tsx"], # Data dependency on any files needed for prerendering. data = glob(["content/*.txt"]) + [ # Need `"type": "module"` to load `*.js` files output by `*.tsx` # compilation. ":package", ], - bundle_js = False, # Optimization: No client-side JavaScript on this site. - lib_deps = [ + deps = [ "//:node_modules/@rules_prerender/preact", "//:node_modules/@types/node", "//:node_modules/preact", - ], + ] ) web_resources_devserver(