Skip to content

Commit fc5162f

Browse files
committed
use env path
1 parent 86dc8a7 commit fc5162f

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ jobs:
3030

3131
- name: Install dependencies
3232
run: pnpm install
33-
build:
34-
needs: cache-and-install
35-
runs-on: ubuntu-latest
36-
steps:
33+
3734
- name: Build
3835
run: pnpm build
3936
env:

vite.config.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
import { defineConfig } from "vite";
1+
import { defineConfig, loadEnv } from "vite";
22
import solid from "vite-plugin-solid";
33

4-
export default defineConfig({
5-
base: "/grid/",
6-
plugins: [solid()],
4+
export default defineConfig(({ command, mode }) => {
5+
// Load env file based on `mode` in the current working directory.
6+
// Set the third parameter to '' to load all env regardless of the `VITE_` prefix.
7+
const env = loadEnv(mode, process.cwd(), "");
8+
return {
9+
plugins: [solid()],
10+
base: env.BASE_PATH,
11+
};
712
});

0 commit comments

Comments
 (0)