Skip to content

0.0.34

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 04 Sep 22:17

BREAKING CHANGES

  • dbc79e7, d0ca850 - The @rules_prerender/preact implementation of <Template /> has been moved to @rules_prerender/declarative_shadow_dom/preact.mjs. The new version automatically includes the DSD polyfill, meaning invoking polyfillDeclarativeShadowDom is no longer needed when using <Template />.

Changelog

  • b0d4401 - Adds <InlinedSvg /> component to @rules_prerender/preact which reads an SVG from binary runfiles and returns it as a VNode to be directly included in application HTML.
  • 719cb36 - Fixes DSD polyfill to apply to nested DSD elements, rather than just the top-level elements.
  • 5f7c09a - Adds re-export functionality to css_library. When no srcs are given, a css_library target switches to a "reexport" of all its dependencies.
  • d9c9975 - Adds CustomElement type to @rules_prerender/preact. This defines the defer-hydration attribute, making it easy to defer components which support the community protocol.

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 = "e3e6c3d42491e2938f4239a3d04259a58adc83e21e352346ad4ef62f87e76125",
    strip_prefix = "rules_js-1.30.0",
    url = "https://github.com/aspect-build/rules_js/releases/download/v1.30.0/rules_js-v1.30.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 = "a10583fd0318da04945e3f2223a233849c0d90b9767672b836f95c86f44a2c6e",
    strip_prefix = "rules_prerender-0.0.34",
    url = "https://github.com/dgp1130/rules_prerender/releases/download/releases%2F0.0.34/rules_prerender-bazel_workspace-0.0.34.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()