dependencies: Switch to pnpm.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2023-03-20 11:52:59 -07:00
committed by Tim Abbott
parent b3f9fdf99a
commit 3a27b12a7d
31 changed files with 12314 additions and 12310 deletions

View File

@@ -17,11 +17,10 @@ from version import ZULIP_VERSION
def build_for_prod_or_puppeteer(quiet: bool) -> NoReturn:
"""Builds for production, writing the output to disk"""
webpack_args = ["node"]
with open("/proc/meminfo") as meminfo:
if int(next(meminfo).split()[1]) < 3 * 1024 * 1024:
webpack_args += ["--max-old-space-size=1536"]
webpack_args += [
os.environ["NODE_OPTIONS"] = "--max-old-space-size=1536"
webpack_args = [
"../node_modules/.bin/webpack-cli",
"--mode=production",
f"--env=ZULIP_VERSION={ZULIP_VERSION}",
@@ -37,7 +36,7 @@ def build_for_dev_server(host: str, port: str, minify: bool, disable_host_check:
# This is our most dynamic configuration, which we use for our
# dev server. The key piece here is that we identify changes to
# files as devs make edits and serve new assets on the fly.
webpack_args = ["node", "../node_modules/.bin/webpack-cli", "serve"]
webpack_args = ["../node_modules/.bin/webpack-cli", "serve"]
webpack_args += [
# webpack-cli has a bug where it ignores --watch-poll with
# multi-config, and we don't need the katex-cli part anyway.