Releases: aspect-build/rules_webpack
v0.16.0
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_webpack",
sha256 = "8079b1c2d08d026f5d1ec0308b194f07da617ebdb6d85f09b6e341a3a156203c",
strip_prefix = "rules_webpack-0.16.0",
url = "https://github.com/aspect-build/rules_webpack/releases/download/v0.16.0/rules_webpack-v0.16.0.tar.gz",
)
#######################
# rules_webpack setup #
#######################
# Fetch the Bazel module dependencies
load("@aspect_rules_webpack//webpack:dependencies.bzl", "rules_webpack_dependencies")
rules_webpack_dependencies()
# Fetch and register a nodejs interpreter, if you haven't already
load("@aspect_rules_js//js:toolchains.bzl", "DEFAULT_NODE_VERSION", "rules_js_register_toolchains")
rules_js_register_toolchains(node_version = DEFAULT_NODE_VERSION)
load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock")
npm_translate_lock(
name = "v4-npm",
npmrc = "//:.npmrc",
pnpm_lock = "//v4:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
npm_translate_lock(
name = "v5-npm",
npmrc = "//:.npmrc",
pnpm_lock = "//v5:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
load("@v4-npm//:repositories.bzl", v4_npm_repositories = "npm_repositories")
load("@v5-npm//:repositories.bzl", v5_npm_repositories = "npm_repositories")
v4_npm_repositories()
v5_npm_repositories()
To use rules_webpack with bazel-lib 2.0, you must additionally register the coreutils toolchain.
load("@aspect_bazel_lib//lib:repositories.bzl", "register_coreutils_toolchains")
register_coreutils_toolchains()
What's Changed
- feat: upgrade to rules_js 2.0 by @gregmagolan in #146
- chore: bump miminum dep to aspect_bazel_lib 2.7.6 by @gregmagolan in #154
- chore: bump to rules_js 2.0.0-rc1 and minimum aspect_bazel_lib 2.7.7 by @gregmagolan in #155
- chore: add --check_direct_dependencies to .bazelrc by @gregmagolan in #157
- chore: bump minimum rules_nodejs to 6.2.0 by @gregmagolan in #158
- build: upgrade to rules_js v2 by @jbedard in #160
Full Changelog: v0.15.0...v0.16.0
v0.16.0-rc1
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_webpack",
sha256 = "3eb030fe713ecf64776a8821c365754a7a589d9aec6f1ccf23dc4133d4f7c658",
strip_prefix = "rules_webpack-0.16.0-rc1",
url = "https://github.com/aspect-build/rules_webpack/releases/download/v0.16.0-rc1/rules_webpack-v0.16.0-rc1.tar.gz",
)
#######################
# rules_webpack setup #
#######################
# Fetch the Bazel module dependencies
load("@aspect_rules_webpack//webpack:dependencies.bzl", "rules_webpack_dependencies")
rules_webpack_dependencies()
# Fetch and register a nodejs interpreter, if you haven't already
load("@aspect_rules_js//js:toolchains.bzl", "DEFAULT_NODE_VERSION", "rules_js_register_toolchains")
rules_js_register_toolchains(node_version = DEFAULT_NODE_VERSION)
load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock")
npm_translate_lock(
name = "v4-npm",
npmrc = "//:.npmrc",
pnpm_lock = "//v4:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
npm_translate_lock(
name = "v5-npm",
npmrc = "//:.npmrc",
pnpm_lock = "//v5:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
load("@v4-npm//:repositories.bzl", v4_npm_repositories = "npm_repositories")
load("@v5-npm//:repositories.bzl", v5_npm_repositories = "npm_repositories")
v4_npm_repositories()
v5_npm_repositories()
To use rules_webpack with bazel-lib 2.0, you must additionally register the coreutils toolchain.
load("@aspect_bazel_lib//lib:repositories.bzl", "register_coreutils_toolchains")
register_coreutils_toolchains()
What's Changed
- chore: bump miminum dep to aspect_bazel_lib 2.7.6 by @gregmagolan in #154
- chore: bump to rules_js 2.0.0-rc1 and minimum aspect_bazel_lib 2.7.7 by @gregmagolan in #155
- chore: add --check_direct_dependencies to .bazelrc by @gregmagolan in #157
- chore: bump minimum rules_nodejs to 6.2.0 by @gregmagolan in #158
Full Changelog: v0.16.0-rc0...v0.16.0-rc1
v0.16.0-rc0
Important
This release requires requires rules_js 2.x. It is not compatible with rules_js 1.x. rules_js 2 is currently in RC: https://github.com/aspect-build/rules_js/releases/tag/v2.0.0-rc0
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_webpack",
sha256 = "64c0900d2b69ca6fbd01ca7cdfaefcdaf4a2ba74c342e3812f9ac37e29309735",
strip_prefix = "rules_webpack-0.16.0-rc0",
url = "https://github.com/aspect-build/rules_webpack/releases/download/v0.16.0-rc0/rules_webpack-v0.16.0-rc0.tar.gz",
)
#######################
# rules_webpack setup #
#######################
# Fetch the Bazel module dependencies
load("@aspect_rules_webpack//webpack:dependencies.bzl", "rules_webpack_dependencies")
rules_webpack_dependencies()
# Fetch and register a nodejs interpreter, if you haven't already
load("@aspect_rules_js//js:toolchains.bzl", "DEFAULT_NODE_VERSION", "rules_js_register_toolchains")
rules_js_register_toolchains(node_version = DEFAULT_NODE_VERSION)
load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock")
npm_translate_lock(
name = "v4-npm",
npmrc = "//:.npmrc",
pnpm_lock = "//v4:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
npm_translate_lock(
name = "v5-npm",
npmrc = "//:.npmrc",
pnpm_lock = "//v5:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
load("@v4-npm//:repositories.bzl", v4_npm_repositories = "npm_repositories")
load("@v5-npm//:repositories.bzl", v5_npm_repositories = "npm_repositories")
v4_npm_repositories()
v5_npm_repositories()
To use rules_webpack with bazel-lib 2.0, you must additionally register the coreutils toolchain.
load("@aspect_bazel_lib//lib:repositories.bzl", "register_coreutils_toolchains")
register_coreutils_toolchains()
What's Changed
- feat: upgrade to rules_js 2.0 by @gregmagolan in #146
Full Changelog: v0.15.0...v0.16.0-rc0
v0.15.0
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_webpack",
sha256 = "615ff9d185be69cbfe32dc77192440cce0bd5901962e894a1049ed3767c97556",
strip_prefix = "rules_webpack-0.15.0",
url = "https://github.com/aspect-build/rules_webpack/releases/download/v0.15.0/rules_webpack-v0.15.0.tar.gz",
)
#######################
# rules_webpack setup #
#######################
# Fetch the Bazel module dependencies
load("@aspect_rules_webpack//webpack:dependencies.bzl", "rules_webpack_dependencies")
rules_webpack_dependencies()
# Fetch and register a nodejs interpreter, if you haven't already
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "node",
node_version = DEFAULT_NODE_VERSION,
)
load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")
npm_translate_lock(
name = "v4-npm",
npmrc = "//:.npmrc",
pnpm_lock = "//v4:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
npm_translate_lock(
name = "v5-npm",
npmrc = "//:.npmrc",
pnpm_lock = "//v5:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
load("@v4-npm//:repositories.bzl", v4_npm_repositories = "npm_repositories")
load("@v5-npm//:repositories.bzl", v5_npm_repositories = "npm_repositories")
v4_npm_repositories()
v5_npm_repositories()
To use rules_webpack with bazel-lib 2.0, you must additionally register the coreutils toolchain.
load("@aspect_bazel_lib//lib:repositories.bzl", "register_coreutils_toolchains")
register_coreutils_toolchains()
What's Changed
- chore: cancel previous GHA from the same PR by @gregmagolan in #139
- docs: fix webpack_devserver link in readme by @jbedard in #142
- fix: expand make variables properly when passed via args by @Aghassi in #140
- Revert "fix: expand make variables properly when passed via args (#140)" by @jbedard in #144
- chore: bump to Bazel 7 by @gregmagolan in #147
- chore: bump to buildifier 6.4.0 by @gregmagolan in #148
- chore: bump to latest stardoc by @gregmagolan in #149
- chore: don't cancel concurrent main builds by @gregmagolan in #151
- fix: add missing transitive dep on bazel_features to rules_webpack_dependencies by @gregmagolan in #152
- chore: add Aspect bazelrc presets and align ci patterns by @gregmagolan in #153
New Contributors
Full Changelog: v0.14.0...v0.15.0
v0.15.0-alpha.0
Important
rules_js maintainers are working towards a rules_js 2.0 RC release. Breakings changes in the underlying provider API require that all downstream rulesets have major releases such as this one. We don't recommended upgrading to this alpha release. For more information on the rules_js 2.0 release see the tracking issue aspect-build/rules_js#1671.
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_webpack",
sha256 = "d24260b25a22bcbbcfba5b74652004efab8d5fb6369dc242aff48599446f3391",
strip_prefix = "rules_webpack-0.15.0-alpha.0",
url = "https://github.com/aspect-build/rules_webpack/releases/download/v0.15.0-alpha.0/rules_webpack-v0.15.0-alpha.0.tar.gz",
)
#######################
# rules_webpack setup #
#######################
# Fetch the Bazel module dependencies
load("@aspect_rules_webpack//webpack:dependencies.bzl", "rules_webpack_dependencies")
rules_webpack_dependencies()
# Fetch and register a nodejs interpreter, if you haven't already
load("@aspect_rules_js//js:toolchains.bzl", "DEFAULT_NODE_VERSION", "rules_js_register_toolchains")
rules_js_register_toolchains(node_version = DEFAULT_NODE_VERSION)
load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock")
npm_translate_lock(
name = "v4-npm",
npmrc = "//:.npmrc",
pnpm_lock = "//v4:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
npm_translate_lock(
name = "v5-npm",
npmrc = "//:.npmrc",
pnpm_lock = "//v5:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
load("@v4-npm//:repositories.bzl", v4_npm_repositories = "npm_repositories")
load("@v5-npm//:repositories.bzl", v5_npm_repositories = "npm_repositories")
v4_npm_repositories()
v5_npm_repositories()
To use rules_webpack with bazel-lib 2.0, you must additionally register the coreutils toolchain.
load("@aspect_bazel_lib//lib:repositories.bzl", "register_coreutils_toolchains")
register_coreutils_toolchains()
What's Changed
- chore: cancel previous GHA from the same PR by @gregmagolan in #139
- docs: fix webpack_devserver link in readme by @jbedard in #142
- fix: expand make variables properly when passed via args by @Aghassi in #140
- Revert "fix: expand make variables properly when passed via args (#140)" by @jbedard in #144
- chore: bump to Bazel 7 by @gregmagolan in #147
- chore: bump to buildifier 6.4.0 by @gregmagolan in #148
- chore: bump to latest stardoc by @gregmagolan in #149
- chore: don't cancel concurrent main builds by @gregmagolan in #151
- fix: add missing transitive dep on bazel_features to rules_webpack_dependencies by @gregmagolan in #152
New Contributors
Full Changelog: v0.14.0...v0.15.0-alpha.0
v0.14.0
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_webpack",
sha256 = "ff7746cd5c7e8ef32d8fbccc720e37c5ec9054fbe705f3576013dbaa1fb5ad40",
strip_prefix = "rules_webpack-0.14.0",
url = "https://github.com/aspect-build/rules_webpack/releases/download/v0.14.0/rules_webpack-v0.14.0.tar.gz",
)
#######################
# rules_webpack setup #
#######################
# Fetch the Bazel module dependencies
load("@aspect_rules_webpack//webpack:dependencies.bzl", "rules_webpack_dependencies")
rules_webpack_dependencies()
load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
rules_js_dependencies()
# Fetch and register a nodejs interpreter, if you haven't already
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "node",
node_version = DEFAULT_NODE_VERSION,
)
load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")
npm_translate_lock(
name = "v4-npm",
npmrc = "//:.npmrc",
pnpm_lock = "//v4:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
npm_translate_lock(
name = "v5-npm",
npmrc = "//:.npmrc",
pnpm_lock = "//v5:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
load("@v4-npm//:repositories.bzl", v4_npm_repositories = "npm_repositories")
load("@v5-npm//:repositories.bzl", v5_npm_repositories = "npm_repositories")
v4_npm_repositories()
v5_npm_repositories()
To use rules_webpack with bazel-lib 2.0, you must additionally register the coreutils toolchain.
load("@aspect_bazel_lib//lib:repositories.bzl", "register_coreutils_toolchains")
register_coreutils_toolchains()
What's Changed
- chore: update to Bazel 6.3.2 and Aspect CLI 5.7.2 by @gregmagolan in #122
- add supports_webpack and run_js_devserver example (#125) by @thesayyn in #128
- fix: clear webpack asset emit cache afterEmit by @jbedard in #127
- fix: correct worker cache key by @jbedard in #129
- fix(worker): fail when build result hasErrors() by @jbedard in #130
- feat: add webpack v4 support by @jbedard in #131
- fix(worker): workaround webpack4 fs write caching by @jbedard in #133
- chore: update bcr maintainer list by @kormide in #132
- chore: BCR testing on Bazel 6 and 7 by @alexeagle in #138
- feat: import toolchains to use for copy actions by @seh in #135
New Contributors
Full Changelog: v0.13.0...v0.14.0
v0.13.0
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_webpack",
sha256 = "21a85849d01eebbd0cb0a5c0120eb58e4d3275eda68565918e7c0d84e14d30d9",
strip_prefix = "rules_webpack-0.13.0",
url = "https://github.com/aspect-build/rules_webpack/releases/download/v0.13.0/rules_webpack-v0.13.0.tar.gz",
)
#######################
# rules_webpack setup #
#######################
# Fetch the Bazel module dependencies
load("@aspect_rules_webpack//webpack:dependencies.bzl", "rules_webpack_dependencies")
rules_webpack_dependencies()
# Fetch and register a nodejs interpreter, if you haven't already
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "node",
node_version = DEFAULT_NODE_VERSION,
)
load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")
npm_translate_lock(
name = "npm",
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
load("@npm//:repositories.bzl", "npm_repositories")
npm_repositories()
What's Changed
- ci: enable buildifier check on ci by @jbedard in #115
- chore: bump rules_js dep to 1.29.2 to pickup Windows fix by @gregmagolan in #116
- chore: bzlmod by @alexeagle in #113
Full Changelog: v0.12.0...v0.13.0
v0.12.0
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_webpack",
sha256 = "78d05d9e87ee804accca80a4fec98a66f146b6058e915eae3d97190397ad12df",
strip_prefix = "rules_webpack-0.12.0",
url = "https://github.com/aspect-build/rules_webpack/releases/download/v0.12.0/rules_webpack-v0.12.0.tar.gz",
)
#######################
# rules_webpack setup #
#######################
# Fetch the Bazel module dependencies
load("@aspect_rules_webpack//webpack:dependencies.bzl", "rules_webpack_dependencies")
rules_webpack_dependencies()
# Fetch and register a nodejs interpreter, if you haven't already
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "node",
node_version = DEFAULT_NODE_VERSION,
)
load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")
npm_translate_lock(
name = "npm",
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
load("@npm//:repositories.bzl", "npm_repositories")
npm_repositories()
What's Changed
- chore: update dependencies by @gregmagolan in #111
- feat: add configure_mode & configure_devtool attributes to webpack_bundle and webpack_devserver by @gregmagolan in #112
Full Changelog: v0.11.0...v0.12.0
v0.11.0
webpack_repositories
repository rule is removed and a new node_modules
attribute is now required for both webpack_bundle
and webpack_devserver
. This change is BREAKING for all users.
After debugging errors with complex webpack configurations with clients we found that fetching webpack in webpack_repositories
and linking into a node_modules
tree within an external Bazel repository can lead to unexpected errors with some webpack plugins that don't expect webpack to be found in multiple node_modules
trees. To fix this problem in the simplest and most general way, this release removes webpack_repositories
and now expects users to provide the target to their own node_modules
trees that must include the webpack
, webpack-cli
and, for the webpack_devserver
rule, also the webpack-dev-server
npm packages.
The //path/to:node_modules
tree target must be passed to the webpack_bundle
and webpack_devserver
rules via the node_modules
attribute. For example,
webpack_bundle(
name = "bundle",
node_modules = "//:node_modules",
...
)
This change has the added benefits of not requiring users to keep the webpack version used in their package.json
in sync with their WORKSPACE and not requiring any changes to rules_webpack
to support new releases of webpack.
WORKSPACE snippet
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_webpack",
sha256 = "2841761bdf7e82f05a00c388e97c7b81dd47b55a30c5bf4109e96aad041352cf",
strip_prefix = "rules_webpack-0.11.0",
url = "https://github.com/aspect-build/rules_webpack/releases/download/v0.11.0/rules_webpack-v0.11.0.tar.gz",
)
#######################
# rules_webpack setup #
#######################
# Fetch the Bazel module dependencies
load("@aspect_rules_webpack//webpack:dependencies.bzl", "rules_webpack_dependencies")
rules_webpack_dependencies()
# Fetch and register a nodejs interpreter, if you haven't already
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "node",
node_version = DEFAULT_NODE_VERSION,
)
load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")
npm_translate_lock(
name = "npm",
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
load("@npm//:repositories.bzl", "npm_repositories")
npm_repositories()
What's Changed
- chore: update deps by @gregmagolan in #109
- refactor: remove vendored webpack versions, user must provider their own webpack tool from their node_modules by @gregmagolan in #110
Full Changelog: v0.10.1...v0.11.0
v0.10.1
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_webpack",
sha256 = "82547fe69e477623dd8a2a50f809e3c89f2035d6b6236d0596d69b7e81c68676",
strip_prefix = "rules_webpack-0.10.1",
url = "https://github.com/aspect-build/rules_webpack/releases/download/v0.10.1/rules_webpack-v0.10.1.tar.gz",
)
#######################
# rules_webpack setup #
#######################
# Fetch the Bazel module dependencies
load("@aspect_rules_webpack//webpack:dependencies.bzl", "rules_webpack_dependencies")
rules_webpack_dependencies()
# Fetch and register a nodejs interpreter, if you haven't already
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "node",
node_version = DEFAULT_NODE_VERSION,
)
# Fetch and register the webpack tool
load("@aspect_rules_webpack//webpack:repositories.bzl", "webpack_repositories")
webpack_repositories(name = "webpack")
load("@webpack//:npm_repositories.bzl", webpack_npm_repositories = "npm_repositories")
webpack_npm_repositories()
What's Changed
- fix: make entry_points optional if output_dir is True by @gregmagolan in #107
Full Changelog: v0.10.0...v0.10.1