0.0.25
Pre-release
Pre-release
Installation
Copy the following into your WORKSPACE.bazel
file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_js",
sha256 = "3ad6684d744ebbc6592d404cc3aa81d0da634eccb3499f6fd198ae122fa28489",
strip_prefix = "rules_js-1.19.0",
url = "https://github.com/aspect-build/rules_js/releases/download/v1.19.0/rules_js-v1.19.0.tar.gz",
)
load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
rules_js_dependencies()
load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "nodejs",
node_version = "18.12.1",
)
load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")
npm_translate_lock(
name = "npm",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
npmrc = "//:.npmrc",
)
load("@npm//:repositories.bzl", "npm_repositories")
npm_repositories()
load("@aspect_bazel_lib//lib:repositories.bzl", "register_jq_toolchains")
register_jq_toolchains()
# This _must_ be named `rules_prerender`, other names are currently unsupported.
http_archive(
name = "rules_prerender",
sha256 = "aed873ce3ec39d0077eab713623b074723d849f00aefb5d3d4ab8c859f25cda7",
strip_prefix = "rules_prerender-releases-0.0.25",
url = "https://github.com/dgp1130/rules_prerender/archive/refs/tags/releases/0.0.25.tar.gz",
)
load("@rules_prerender//:dependencies.bzl", "rules_prerender_dependencies")
rules_prerender_dependencies()
load("@rules_prerender//:repositories.bzl", "rules_prerender_repositories")
rules_prerender_repositories()
load(
"@rules_prerender//:npm_repositories.bzl",
prerender_npm_repositories = "npm_repositories",
)
prerender_npm_repositories()
Breaking changes
- c146934 - Restricts visibility of some internal targets. These were never considered public API.
- a40f86c - Updates annotations to switch from an HTML comment syntax to a new HTML element syntax. You're not depending on this anyways, because you're a good user, and won't be affected. But if any mean users did depend on this, they would likely be broken.
Changelog
- 0bf6e70 - Adds
SafeHtml
and related functionality. This represents HTML content which has been sanitized and is "safe by construction". Eventually,PrerenderResource
will stop accepting raw strings as inputs. - #71 - Adds
@rules_prerender/preact
templating engine. This provides DOM sanitization through JSX templates and integrates withSafeHtml
. See documentation in README and example for more details. - 33f6c94 - Adds
--@rules_prerender//tools/flags:debug_prerender
. Recommend aliasing this to--debug_prerender
. Set this to invoke a specificprerender_pages()
target with--inspect-brk
and some extra flags to make it more debuggable. Usage:bazel build //path/to/pkg:target --debug_prerender=//path/to/pkg:some_prerender_pages_target
. More documentation in README.