Skip to content

Commit

Permalink
fix: improve developing experience with Electron on Windows (#796)
Browse files Browse the repository at this point in the history
* fix: improve experience with electron on Windows

* docs: add tips when develop with electron
  • Loading branch information
cesaryuan authored Oct 8, 2024
1 parent e5fc18f commit 3416329
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ You need to fill in the required environment variables first.
cp .env.example .env
```

Then run:
Then set `VITE_API_URL` to `https://api.follow.is` and run:

```sh
pnpm run dev
Expand Down
4 changes: 3 additions & 1 deletion apps/main/src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const appFolder = {
prod: "Follow",
dev: "Follow (dev)",
}

if (process.argv.length === 3 && process.argv[2].startsWith("follow-dev:")) {
process.env.NODE_ENV = "development"
}
const isDev = process.env.NODE_ENV === "development"

/**
Expand Down

0 comments on commit 3416329

Please sign in to comment.