If you are using a custom build script, you will need to add the following
builder applications to what you already have, almost certainly at the end of
the list (unless you need to post-process the js files).

[
apply(
'build_web_compilers|ddc',
[
(_) => new ModuleBuilder(),
(_) => new UnlinkedSummaryBuilder(),
(_) => new LinkedSummaryBuilder(),
(_) => new DevCompilerBuilder()
],
toAllPackages(),
// Recommended, but not required. This makes it so only modules that are
// imported by entrypoints get compiled.
isOptional: true,
hideOutput: true),
apply('build_web_compilers|entrypoint',
// You can also use `WebCompiler.Dart2Js`. If you don't care about
// dartdevc at all you may also omit the previous builder application
// entirely.
[(_) => new WebEntrypointBuilder(WebCompiler.DartDevc)], toRoot(),
hideOutput: true,
// These globs should match your entrypoints only.
defaultGenerateFor: const InputSet(
include: const ['web/**', 'test/**.browser_test.dart'])),
]

Dart2JS now has minification (--minify) enabled by default, similar to how
it worked in pub build. If you are adding custom dart2js options, make
sure you still keep the --minify flag. Here is an example:

Cast failures will now be ignored in dartdevc by default (these were enabled
in the latest sdk), and added an ignore_cast_failures option to the
build_web_compilers|entrypoint builder which you can set to true to enable
them.

At some point in the future it is expected that the default for this will
flip.

All dart files under test are now compiled by default instead of only the
_browser_test.dart files (minus vm/node test bootstrap files). This means
the original tests can be debugged directly (prior to package:test
bootstrapping).

Added support for dart2js. This can be configured using the top level
compiler option for the build_web_compilers|entrypoint builder. The
supported options are dartdevc (the default) and dart2js. Args can be
passed to dart2js using the dart2js_args option. For example: