0.0.27
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 = "f598407027ad43c3386ea81548c323e8dc8bf054275cdc2c83c986f7916d3d99",
strip_prefix = "rules_prerender-releases-0.0.27",
url = "https://github.com/dgp1130/rules_prerender/archive/refs/tags/releases/0.0.27.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
- 0aab086, 217ae5b, 73f61b6 - Splits
PrerenderResource.of()intoPrerenderResource.fromText(),PrerenderResource.fromBinary(), andPrerenderResource.fromHtml(). These different functionalities have different security characteristics which needed to be taken into account.fromText()andfromBinary()work just likePrerenderResource.of()worked with a raw string or binary input, except that they throw an error when outputting to a*.htmlor*.htmfile. This is for security reasons.PrerenderResource.fromHtml()works likePrerenderResource.of()worked forSafeHtmlinputs and is allowed to output to a*.htmor*.htmlfile. - f32c6bc - Updates
renderToHtml()to render "non-pretty" HTML. This removes leading and trailing whitespace unintentionally added by the rendering process when it was "prettified". This should be more accurate to the actual authored JSX.
Changelog
- 66339ec - Updates
renderToHtml()to support rendering a component as the root element, so long as that component ultimately renders an<html />tag as the top-level element.