Skip to content

Commit

Permalink
Add workaround for webrecorder/wabac.js#105
Browse files Browse the repository at this point in the history
  • Loading branch information
wvengen committed Jan 31, 2023
1 parent 7e19f8d commit 58b259e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ RUN mkdir /app && \

# modify service worker to add injection script
RUN sed -i 's/\(injectScripts:\s*\[\)/\1"inject.js",/' /app/sw.js
# workaround for https://github.com/webrecorder/wabac.js/issues/105
RUN sed -i 's/if\s*(\s*!\s*\([a-zA-Z_]\+\)\(\.length)\s*return[^)]\+size of the file is not accessible\)/if(\1.canLoadOnDemand\&\&!\1\2/' /app/sw.js

FROM nginx:mainline-alpine-slim AS runner

Expand Down

0 comments on commit 58b259e

Please sign in to comment.