Skip to content

Commit 1ef8e92

Browse files
authored
Merge pull request #25 from seamapi/build-example
2 parents 997350f + 58f9f05 commit 1ef8e92

File tree

4 files changed

+754
-573
lines changed

4 files changed

+754
-573
lines changed

examples/create-vite-config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { dirname } from 'node:path'
1+
import { basename, dirname } from 'node:path'
2+
import { env } from 'node:process'
23
import { fileURLToPath } from 'node:url'
34

45
import react from '@vitejs/plugin-react'
@@ -9,6 +10,7 @@ import tsconfigPaths from 'vite-tsconfig-paths'
910
export default async (url) =>
1011
await defineConfig({
1112
envPrefix: 'SEAM_',
13+
base: env.CI ? `/examples/${basename(dirname(fileURLToPath(url)))}` : '/',
1214
root: dirname(fileURLToPath(url)),
1315
plugins: [tsconfigPaths(), react()],
1416
server: {

0 commit comments

Comments
 (0)