Skip to content

0.35.0

Compare
Choose a tag to compare
@alexeagle alexeagle released this 02 Aug 16:54

The documentation site at
https://bazelbuild.github.io/rules_nodejs/
is totally revamped and now includes documentation for all the rule sets!

There is a new @bazel/stylus package for running the Stylus CSS preprocessor.
See https://github.com/bazelbuild/rules_nodejs/blob/0.35.0/docs/Stylus.md

To upgrade, change the version in your /WORKSPACE

http_archive(
    name = "build_bazel_rules_nodejs",
    sha256 = "6625259f9f77ef90d795d20df1d0385d9b3ce63b6619325f702b6358abb4ab33",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.35.0/rules_nodejs-0.35.0.tar.gz"],
)

and update the @bazel/* packages to 0.35.0 via npm or yarn:

$ npm outdated
# or 
$ yarn outdated

Bug Fixes

  • jasmine: enforce that jasmine_node_test is loaded from new location (7708858), closes #838
  • fencing for npm packages (#946) (780dfb4)

Features

  • builtin: do code splitting even if only one entry point (f51c129)
  • stylus: add initial stylus rule (804a788)
  • stylus: output sourcemap (dac014a)
  • stylus: support import by allowing files in deps (3987070)

BREAKING CHANGES

jasmine: You can no longer get jasmine_node_test from @build_bazel_rules_nodejs.

  • Use load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test")
    instead
  • You need to remove @npm//jasmine from the deps of the
    jasmine_node_test
  • If you use user-managed dependencies, see the commit for examples of
    the change needed

rollup_bundle now automatically does code-splitting when there are dynamic import() statements in your app.

You no longer need to specify additional_entry_points unless you really need to load them as a top-level script, not via an import from the main entry point.
This changes the outputs of the rollup_bundle. To go back to the previous behavior, add enable_code_splitting=False to your rollup_bundle rule.
Thanks to @Jesse-Good for contributing this!