Simplify the app build a little. Change-Id: I16bf812f5e01a3098d0644298f606970d7e7321a Reviewed-on: https://code-review.googlesource.com/c/re2/+/61470 Reviewed-by: Paul Wankadia <junyer@google.com> Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
diff --git a/app/BUILD.bazel b/app/BUILD.bazel index 01ff8d4..50e7e2c 100644 --- a/app/BUILD.bazel +++ b/app/BUILD.bazel
@@ -10,6 +10,7 @@ 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 c272bf5..a606d7b 100755 --- a/app/build.sh +++ b/app/build.sh
@@ -25,13 +25,7 @@ ${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}