Skip to content

Releases: aspect-build/rules_webpack

v0.16.0

15 Aug 20:15
a6b7ebe
Compare
Choose a tag to compare
v0.16.0 Pre-release
Pre-release

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

Full Changelog: v0.15.0...v0.16.0

v0.16.0-rc1

14 Aug 15:41
6e59020
Compare
Choose a tag to compare
v0.16.0-rc1 Pre-release
Pre-release

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

Full Changelog: v0.16.0-rc0...v0.16.0-rc1

v0.16.0-rc0

22 May 01:20
eb5a6de
Compare
Choose a tag to compare
v0.16.0-rc0 Pre-release
Pre-release

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

Full Changelog: v0.15.0...v0.16.0-rc0

v0.15.0

22 May 01:20
4ab9bbe
Compare
Choose a tag to compare
v0.15.0 Pre-release
Pre-release

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

New Contributors

Full Changelog: v0.14.0...v0.15.0

v0.15.0-alpha.0

10 May 06:09
Compare
Choose a tag to compare
v0.15.0-alpha.0 Pre-release
Pre-release

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

New Contributors

Full Changelog: v0.14.0...v0.15.0-alpha.0

v0.14.0

31 Jan 16:58
Compare
Choose a tag to compare
v0.14.0 Pre-release
Pre-release

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

New Contributors

  • @seh made their first contribution in #135

Full Changelog: v0.13.0...v0.14.0

v0.13.0

18 Aug 19:29
b5e8cd4
Compare
Choose a tag to compare
v0.13.0 Pre-release
Pre-release

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

Full Changelog: v0.12.0...v0.13.0

v0.12.0

25 Mar 01:10
493e78c
Compare
Choose a tag to compare
v0.12.0 Pre-release
Pre-release

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

20 Mar 20:38
a6b097d
Compare
Choose a tag to compare
v0.11.0 Pre-release
Pre-release

⚠️ BREAKING CHANGES ⚠️

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

19 Mar 02:28
00533af
Compare
Choose a tag to compare
v0.10.1 Pre-release
Pre-release

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

Full Changelog: v0.10.0...v0.10.1