environment
option to the DevCompilerBuilder
.environment
option of the build_web_compilers|ddc
builder.Map<String, String>
and is equivalent to providing -D<key>=<value>
command line arguments.Fix the skipPlatformCheck option which was accidentally doing the opposite of what it claimed.
dart_sdk.js
rather than the analyzer version.Add an option to globally skip the platform checks instead of only skipping them for a set of whitelisted packages.
Republish of 2.5.0
with the proper min sdk contraint.
Ignore the trackUnusedInputs
option that was added in 2.5.0
.
This option will be respected again in the next release which will have the proper minimum sdk constraint.
Add support for dependency pruning to the DevCompilerBuilder
. This should greatly improve the invalidation semantics for builds, meaning that less code will be recompiled for each edit you make.
This is enabled by default when using build_runner, and can be disabled using the track-unused-inputs: false
option if you run into issues, so in your build.yaml
it would look like this:
targets: $default: build_web_compilers:ddc: options: track-unused-inputs: false
When using the builder programatically it is disabled by default and can be enabled by passing trackUnusedInputs: true
to the DevCompilerBuilder
constructor.
Make the required assets for DDC applications configurable in the bootstrapDdc
method instead of hard coded. This allows custom integrations like flutter web to not require the same assets, or require additional custom assets.
You can now build a basic app or test in isolation by only requesting the *.dart.js
file using a build filter, for example adding this argument to any build_runner command would build the web/main.dart
app only: --build-filter=web/main.dart.js
.
For tests you will need to specify the bootstrapped test file, so: --build-filter=test/hello_world.dart.browser_test.dart.js
.
Previously you also had to explicitly require the SDK resources like: --build-filter="package:build_web_compilers/**.js"
or similar.
Note: If your app relies on any non-Dart generated files you will likely have to ask for those explicitly as well with additinal filters.
dart:io
when the module is from a specified package. This is not used in the default build, but is available for custom DDC integrations.librariesPath
configurable in DevCompilerBuilder
.dart2js_args
is configured improperly.platformSdk
, sdkKernelPath
, and platform
configurable in DevCompilerBuilder
.In this release, the Dart front end for the dev_compiler
is changing from the analyzer to the common front end. This should unify error messages and general consistency across platforms, as this was one of the last compilers left still using the analyzer as a front end.
While this is intended to be a transparent change, it is likely that there will be unintended differences. Please file issues if you experience something that seems broken or not working as intended.
Previously, all files with a main
that were matched by the input globs would attempt to compile for the web. This caused an issue when there were non-web applications in the default directories, which specifically happens a lot in the test
directory. Resolving this required custom globs in build.yaml
files.
Two changes were made to help handle this issue more gracefully, in a way that often doesn't require custom build.yaml
files any more.
dart:
imports).build.yaml
than waiting for us to detect it. This may change based on feedback.test
directory to only include the test/**.dart.browser_test.dart
files (other dirs remain unchanged).test
dir and running tests that way no longer works, as those entrypoints won't be compiled. You would need to configure the generate_for
to explicitly include test/**_test.dart
to restore that functionality (we will continue pushing on this in the future though to restore similar functionality).build_test
package will now output <platform>_test.dart
files based on your TestOn annotations, so using those where possible will help reduce build platform support warnings as well.package:analyzer
to <0.37.0
.build_root_app_summary
configuration option.ddc_kernel
and ddc
workers under a single name (ddc
)..dart.browser_test.dart
files will be compiled under the test
directory, instead of all _test.dart
files.targets: $default: builders: build_web_compilers|entrypoint: generate_for: - test/**_test.dart - web/**.dart
use-incremental-compiler
option for the build_web_compilers:ddc
builder. This is enabled by default but can be disabled if running into build issues by setting it to false
globally:global_options: build_web_compilers:ddc: options: use-incremental-compiler: false
dart_sdk.js
and require.js
files, which it deletes during production builds.$sdk
package to resolve some issues with build output bloat.dartdevc
as your production compiler, you will need to disable the cleanup builder in build.yaml
(globally) like this:global_options: build_web_compilers|sdk_js_cleanup: release_options: enabled: false
.digests
file which contains transitive digests for an entrypoint.package:analyzer
to <0.36.0
.enable_sync_async
and ignore_cast_failures
options for the build_web_compilers|entrypoint
builder. These will no longer have any effect and will give a build time warning if you try to use them.package:analyzer
to <0.35.0
.package:analyzer
version 0.33.x
.package:build_modules
version 1.x.x
.window.postMessage
during initialization if the current context is a Window
.<base>
tag is used.<base href="/.../">
tag should start and end with a /
to be used as the base url for require js.dartdevc
compiler. (reapplied)new
keyword for a working release on Dart 1 VM.dartdevc
compiler.<3.0.0
.package:build_config
to include version 0.3.x
.package:archive
to include version 2.x.x
.package:analyzer
0.32.0
.enable_sync_async
to true
for the build_web_compilers|entrypoint
builder.ignore_cast_failures
to false
for the build_web_compilers|entrypoint
builder..dart
sources and .js.map
files from the output directory in release mode..tar.gz
outputs produced by Dart2Js.
Dart2Js
outputs other than deferred part files.dartdevc
compiler to detect correct base url for require js.enable_sync_async
option to the build_web_compilers|entrypoint
builder, which defaults to false
.dartdevc
compiler now respects the <base href="/....">
tags and will set them as the base url for require js.pool
package.dart2js
by default in release mode..packages
file and use the new frontend with dart2js
.--use-old-frontend
with dart2js
as a stopgap until we can add support for .packages
files.dartdevc
.--dump-info
and the dart2js
compiler. If you pass that argument with dart2js_args
the .info.json
file will be copied the output.--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:targets: $default: builders: build_web_compilers|entrypoint: generate_for: - web/**.dart options: compiler: dart2js dart2js_args: - --fast-startup - --minify - --trust-type-annotations - --trust-primitives
ignore_cast_failures
option to the build_web_compilers|entrypoint
builder which you can set to true
to enable them.dart2js
and the --no-source-maps
flag.ModuleBuilder
, UnlinkedSummaryBuilder
and LinkedSummaryBuilder
into a separate build_modules
package.analyzer
package.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).package:build
version 0.12.0
.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:targets: <my_package>: builders: build_web_compilers|entrypoint: options: compiler: dart2js dart2js_args: - --minify
ddc_bootstrap
builder to entrypoint
, the exposed class also changed from DevCompilerBootstrapBuilder
to WebEntrypointBuilder
.jsBootstrapExtension
to ddcBootstrapExtension
since it is only required when using the dev compiler.ddc_bootstrap
builder with build_to: cache
.build_web_compilers