Commit Graph

9 Commits

Author SHA1 Message Date
Anders Kaseorg 8a2086fb4c dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-06-05 21:51:26 -07:00
Alex Vandiver a9f51a0c02 static: Add Timing-Allow-Origin: * to allow sentry data timing.
This is required for the browser to provide detailed timing
information about resource fetches from other domains[^1].

[^1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Timing-Allow-Origin
2023-05-09 13:16:28 -07:00
Anders Kaseorg 60d49ae4a6 eslint: Fix @typescript-eslint/prefer-nullish-coalescing.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-04-19 16:52:39 -07:00
Alex Vandiver 1833afee6a js: Enable cross-origin error debugging with crossorigin="anonymous".
If the script comes from a different origin than the requesting page,
and is not marked `crossorigin="anonymous"`, the `window.onerror`
handler receives no information other than "Script error." in the
event of a runtime error.

This effectively silences blueslip errors in development if the user
is developing on a remote host (such as a DigitalOcean droplet), since
static resources are served from `hostname.zulipdev.org`, and the
realm is served from `realmname.hostname.zulipdev.org`.  It also
silenced blueslip reporting in production for any non-default (non-"")
realms.  Sentry reporting, Vagrant developments, and truly ancient or
insecure browsers were unaffected.

Add the necessary `crossorigin="anonymous"` attribute to the
`<script>` tag to allow blueslip access to this error information.
2023-04-13 14:59:58 -07:00
Anders Kaseorg b533cd979e templates: Enable Handlebars strict mode.
https://handlebarsjs.com/api-reference/compilation.html

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-04-05 15:23:54 -07:00
Anders Kaseorg 730eda60bc webpack: Disable webpack-dev-server overlay for runtime errors.
webpack-dev-server 4.12.0 introduced a global handler that shows a
full-screen overlay for all runtime errors, but it’s redundant with
our blueslip_stacktrace handler and less functional at this time.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-21 12:36:37 -07:00
Anders Kaseorg 3a27b12a7d dependencies: Switch to pnpm.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-20 15:48:29 -07:00
Alex Vandiver a8181152b7 webpack: Build a ZULIP_VERSION global constant into the built product. 2023-03-07 10:51:45 -08:00
Anders Kaseorg 0ef8e88b17 webpack: Move webpack configuration to web.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-24 06:35:58 -08:00