Skip to content

Commit

Permalink
Enable terser workarounds for Safari 10
Browse files Browse the repository at this point in the history
This fixes an error in production builds of the client in Safari 10:

```
SyntaxError: Cannot declare a let variable twice: 't'.
```

Fixes #2664
  • Loading branch information
robertknight committed Oct 22, 2020
1 parent 25d3aa4 commit bb83c85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/gulp/minify-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ function minifyStream() {
const code = Buffer.concat(this.chunks).toString();

// See https://github.com/terser/terser#minify-options-structure
const options = {};
const options = {
// See https://github.com/hypothesis/client/issues/2664.
safari10: true,
};

// If the code we're minifying has a sourcemap then generate one for the
// minified output, otherwise skip it.
Expand Down

0 comments on commit bb83c85

Please sign in to comment.