From 3ab312e73ccd49082ea719ef835e85515a0e2a25 Mon Sep 17 00:00:00 2001 From: David Colon <38386583+Da-Colon@users.noreply.github.com> Date: Sun, 24 Mar 2024 19:06:32 -0400 Subject: [PATCH 1/2] force deps to optimized when starting vite dev server --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 704e178eda..9eb2b66650 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "lint:check": "eslint . --ext .ts,.tsx", "pretty": "prettier . --write", "pretty:check": "prettier . --check", - "dev": "npm run graphql:build && VITE_APP_GIT_HASH=`git rev-parse HEAD` vite", + "dev": "VITE_APP_GIT_HASH=`git rev-parse HEAD` vite --force", "start": "vite start", "preview": "vite preview", "build": "npm run graphql:build && VITE_APP_GIT_HASH=`git rev-parse HEAD` vite build", From bbf4202e29603b40e8b7d37fc8cab8301d438d55 Mon Sep 17 00:00:00 2001 From: David Colon <38386583+Da-Colon@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:19:54 -0400 Subject: [PATCH 2/2] add postinstall script to compile graphql --- package-lock.json | 1 + package.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 26e08e9d26..b0bef06f42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,6 +5,7 @@ "packages": { "": { "name": "fractal-interface", + "hasInstallScript": true, "dependencies": { "@apollo/client": "^3.7.10", "@chakra-ui/react": "^2.8.2", diff --git a/package.json b/package.json index 9eb2b66650..3807d7150a 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,8 @@ "graphql:build": "graphclient build", "graphql:dev-server": "graphclient serve-dev", "test": "vitest --dir=test", - "tests": "playwright test" + "tests": "playwright test", + "postinstall": "npm run graphql:build" }, "engines": { "node": "20.11.1",