Initial commit
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
--- a/third_party/devtools-frontend/src/front_end/Images/BUILD.gn
|
||||
+++ b/third_party/devtools-frontend/src/front_end/Images/BUILD.gn
|
||||
@@ -28,7 +28,7 @@ node_action("generate_css_vars") {
|
||||
}
|
||||
|
||||
node_action("optimize_images") {
|
||||
- script = "node_modules/rollup/dist/bin/rollup"
|
||||
+ script = "../../node/node_modules/@rollup/wasm-node/dist/bin/rollup"
|
||||
|
||||
_bundled_entrypoint = target_gen_dir + "/Images.prebundle.js"
|
||||
_output_file_location = target_gen_dir + "/Images.js"
|
||||
--- a/third_party/devtools-frontend/src/front_end/models/live-metrics/web-vitals-injected/BUILD.gn
|
||||
+++ b/third_party/devtools-frontend/src/front_end/models/live-metrics/web-vitals-injected/BUILD.gn
|
||||
@@ -26,7 +26,7 @@ devtools_module("web-vitals-injected") {
|
||||
}
|
||||
|
||||
node_action("bundled_library") {
|
||||
- script = "node_modules/rollup/dist/bin/rollup"
|
||||
+ script = "../../node/node_modules/@rollup/wasm-node/dist/bin/rollup"
|
||||
|
||||
_bundled_entrypoint = target_gen_dir + "/web-vitals-injected.js"
|
||||
_output_file_location = target_gen_dir + "/web-vitals-injected.generated.js"
|
||||
--- a/third_party/devtools-frontend/src/front_end/panels/recorder/injected/BUILD.gn
|
||||
+++ b/third_party/devtools-frontend/src/front_end/panels/recorder/injected/BUILD.gn
|
||||
@@ -55,7 +55,7 @@ devtools_entrypoint("bundle") {
|
||||
}
|
||||
|
||||
node_action("bundled_library") {
|
||||
- script = "node_modules/rollup/dist/bin/rollup"
|
||||
+ script = "../../node/node_modules/@rollup/wasm-node/dist/bin/rollup"
|
||||
|
||||
_bundled_entrypoint = target_gen_dir + "/injected.js"
|
||||
_output_file_location = target_gen_dir + "/injected.generated.js"
|
||||
--- a/third_party/devtools-frontend/src/inspector_overlay/BUILD.gn
|
||||
+++ b/third_party/devtools-frontend/src/inspector_overlay/BUILD.gn
|
||||
@@ -36,7 +36,7 @@ action("build_inspector_overlay") {
|
||||
"$target_gen_dir/tool_window_controls.css",
|
||||
"$target_gen_dir/main.js",
|
||||
devtools_location_prepend + "inspector_overlay/loadCSS.rollup.js",
|
||||
- devtools_location_prepend + "node_modules/rollup/dist/bin/rollup",
|
||||
+ devtools_location_prepend + "../../node/node_modules/@rollup/wasm-node/dist/bin/rollup",
|
||||
]
|
||||
|
||||
outputs = [ "$resources_out_dir/main.js" ]
|
||||
--- a/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py
|
||||
+++ b/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py
|
||||
@@ -56,7 +56,7 @@ def rollup(input_path, output_path, file
|
||||
[devtools_paths.node_path(),
|
||||
devtools_paths.rollup_path()] +
|
||||
['--format', 'iife', '-n', 'InspectorOverlay'] + ['--input', target] +
|
||||
- ['--plugin', rollup_plugin, '--plugin', 'terser'],
|
||||
+ ['--plugin', rollup_plugin, '--plugin', path.join(devtools_paths.node_modules_path(), '@rollup', 'plugin-terser', 'dist', 'cjs', 'index.js')],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
universal_newlines=True,
|
||||
--- a/third_party/devtools-frontend/src/scripts/build/ninja/bundle.gni
|
||||
+++ b/third_party/devtools-frontend/src/scripts/build/ninja/bundle.gni
|
||||
@@ -11,7 +11,7 @@ template("bundle") {
|
||||
"You must define the 'entrypoint' for a bundle target")
|
||||
|
||||
node_action(target_name) {
|
||||
- script = "scripts/build/esbuild.js"
|
||||
+ script = "../../node/node_modules/@rollup/wasm-node/dist/bin/rollup"
|
||||
forward_variables_from(invoker,
|
||||
[
|
||||
"visibility",
|
||||
@@ -21,27 +21,23 @@ template("bundle") {
|
||||
|
||||
inputs = [
|
||||
invoker.entrypoint,
|
||||
+ devtools_location_prepend + "scripts/build/rollup.config.mjs",
|
||||
devtools_location_prepend + "scripts/build/devtools_plugin.js",
|
||||
devtools_location_prepend + "scripts/devtools_paths.js",
|
||||
]
|
||||
|
||||
- _esbuild = devtools_location_prepend + "third_party/esbuild/esbuild"
|
||||
- if (host_os == "win") {
|
||||
- inputs += [ _esbuild + ".exe" ]
|
||||
- } else {
|
||||
- inputs += [ _esbuild ]
|
||||
- }
|
||||
-
|
||||
args = [
|
||||
+ "--config",
|
||||
+ rebase_path(
|
||||
+ devtools_location_prepend + "scripts/build/rollup.config.mjs",
|
||||
+ root_build_dir),
|
||||
+ "--input",
|
||||
rebase_path(invoker.entrypoint, root_build_dir),
|
||||
+ "--file",
|
||||
rebase_path(invoker.output_file_location, root_build_dir),
|
||||
"--configSourcemaps",
|
||||
]
|
||||
|
||||
- if (!is_debug) {
|
||||
- args += [ "--minify" ]
|
||||
- }
|
||||
-
|
||||
outputs = [ invoker.output_file_location ]
|
||||
}
|
||||
}
|
||||
--- a/third_party/devtools-frontend/src/scripts/devtools_paths.py
|
||||
+++ b/third_party/devtools-frontend/src/scripts/devtools_paths.py
|
||||
@@ -64,8 +64,11 @@ def license_checker_path():
|
||||
|
||||
def rollup_path():
|
||||
return path.join(
|
||||
- node_modules_path(),
|
||||
- 'rollup',
|
||||
+ third_party_path(),
|
||||
+ 'node',
|
||||
+ 'node_modules',
|
||||
+ '@rollup',
|
||||
+ 'wasm-node',
|
||||
'dist',
|
||||
'bin',
|
||||
'rollup',
|
||||
Reference in New Issue
Block a user