Implement devtools_entrypoint
Port formatter_worker to use devtools_entrypoint, which is the abstraction
around `rollup`. It handles the creation of the rollup bundle, but leaves
it alone if you are building with `is_debug=true`. This way, we can keep
development use the existing workflow where individual files are fetched,
while in release mode we bundle the entrypoint into 1 big file.
In the future, anything we consider an entrypoint must use this method.
This would include third_party packages like lit-html and CodeMirror.
A follow-up CL will move the lit-html entrypoint back into
third_party/lit-html, as we no longer require it to be a direct subfolder
of `front_end/` (that was fixed in
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2270168)
DISABLE_THIRD_PARTY_CHECK=TypeScript fixes
[email protected],[email protected]
Bug: 1098730
Change-Id: I5d2e67cc9c71291e8b67bbc29354e75239aae9a9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2267001
Commit-Queue: Tim van der Lippe <[email protected]>
Reviewed-by: Paul Lewis <[email protected]>
diff --git a/BUILD.gn b/BUILD.gn
index 5913126..2994d6c 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -479,7 +479,6 @@
"extensions/extensions-legacy.js",
"formatter/formatter.js",
"formatter/formatter-legacy.js",
- "formatter_worker/formatter_worker.js",
"formatter_worker/formatter_worker-legacy.js",
"har_importer/har_importer.js",
"har_importer/har_importer-legacy.js",
@@ -884,6 +883,9 @@
"$resources_out_dir/wasmparser_worker_entrypoint.js",
]
+generated_typescript_entrypoints =
+ [ "$resources_out_dir/formatter_worker/formatter_worker.js" ]
+
devtools_applications = [
"lighthouse_worker",
"devtools_app",
@@ -933,6 +935,7 @@
# Required for layout tests, which depend on the existence of `integration_test_runner.html`
# If we don't add this dependency explicitly, the swarming bots don't pick up the file.
"front_end:front_end_html_entrypoints",
+ "front_end/formatter_worker:formatter_worker-rollup",
]
if (is_debug) {
@@ -1659,7 +1662,7 @@
generated_devtools_module_entrypoints + output_devtools_modules +
generated_applications_html + generated_applications_js +
generated_non_autostart_non_remote_modules + devtools_embedder_scripts +
- generated_worker_bundles +
+ generated_worker_bundles + generated_typescript_entrypoints +
[
"$resources_out_dir/devtools_extension_api.js",
"$resources_out_dir/sdk/wasm_source_map/pkg/wasm_source_map_bg.wasm",