diff --git a/app/BUILD.bazel b/app/BUILD.bazel index 01ff8d429..50e7e2c92 100644 --- a/app/BUILD.bazel +++ b/app/BUILD.bazel @@ -10,6 +10,7 @@ cc_binary( linkopts = [ "--bind", "-sENVIRONMENT=web", + "-sSINGLE_FILE=1", "-sMODULARIZE=1", "-sEXPORT_ES6=1", "-sEXPORT_NAME=loadModule", diff --git a/app/build.sh b/app/build.sh index c272bf5ac..a606d7bec 100755 --- a/app/build.sh +++ b/app/build.sh @@ -25,13 +25,7 @@ else ${BAZEL} build --compilation_mode=opt \ --copt=-fno-stack-protector \ -- :all - # Bazel doesn't retain the `_re2.wasm` artifact; - # we have to redo the link command to obtain it. - pushd .. - emcc @bazel-bin/app/_re2.js-2.params - cd bazel-bin/app - cp _re2.js _re2.wasm ${DSTDIR} - popd + cp ../bazel-bin/app/_re2.js ${DSTDIR} # Clean up the sundry Bazel output directories. ${BAZEL} clean --expunge cp app.ts index.html _re2.d.ts ${DSTDIR}