Manual Usage

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'])),
]