diff --git a/.github/workflows/on_pull_request.yml b/.github/workflows/on_pull_request.yml index 21cc5d17795c..0d4cfc2040cd 100644 --- a/.github/workflows/on_pull_request.yml +++ b/.github/workflows/on_pull_request.yml @@ -88,6 +88,7 @@ jobs: - scripts/ci/* - "**/*.html" - "**/*.js" + - "**/*.mjs" - "**/*.json" - "**/*.rs" - "**/*.toml" diff --git a/rerun_js/web-viewer/build-wasm.mjs b/rerun_js/web-viewer/build-wasm.mjs index 70522e6f59b0..38f1da99b377 100644 --- a/rerun_js/web-viewer/build-wasm.mjs +++ b/rerun_js/web-viewer/build-wasm.mjs @@ -15,20 +15,26 @@ const exec = (cmd) => { }; function buildWebViewer(mode) { + let modeFlags = ""; switch (mode) { - case "debug": { - return exec( - "cargo run -p re_dev_tools -- build-web-viewer --debug --target no-modules-base -o rerun_js/web-viewer", - ); - } - case "release": { - return exec( - "cargo run -p re_dev_tools -- build-web-viewer --release -g --target no-modules-base -o rerun_js/web-viewer", - ); - } + case "debug": + modeFlags = "--debug"; + break; + case "release": + modeFlags = "--release -g"; + break; default: throw new Error(`Unknown mode: ${mode}`); } + return exec( + [ + "cargo run -p re_dev_tools -- build-web-viewer", + modeFlags, + "--target no-modules-base", + "--features map_view,grpc", + "-o rerun_js/web-viewer", + ].join(" "), + ); } function re_viewer_js() {