0.0.23
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 = "23c1fbf35dfa0c01c9063b0f49eb846f87f9a4cfd2b4ed79152e7e140bc95fda",
strip_prefix = "rules_prerender-releases-0.0.23",
url = "https://github.com/dgp1130/rules_prerender/archive/refs/tags/releases/0.0.23.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
- #33 -
@rules_prerender
now requires native EcmaScript modules (ESM). JavaScript source files should use ESM syntax (import
/export
) and TypeScript should emit usingmodule: "ES2020"
ormodule: "ES2015"
. You likely also wantmoduleResolution: "node"
and to name your files*.mjs
or*.mts
as well as import files via explicit*.mjs
extensions (import {} from './foo.mjs'
).