Skip to content

Commit bb67b06

Browse files
authored
Merge pull request #6 from flexdevguy/feature/simplify-architecture
Feature/simplify architecture
2 parents bd74646 + 19ec056 commit bb67b06

File tree

3 files changed

+263
-3
lines changed

3 files changed

+263
-3
lines changed

package-lock.json

Lines changed: 257 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"scripts": {
77
"dev": "vite",
88
"build": "vite build",
9+
"build:gh": "vite build --mode gh-pages",
10+
"deploy:gh": "gh-pages -d dist --nojekyll",
911
"build:analyze": "ANALYZE=true vite build",
1012
"preview": "vite preview",
1113
"test": "vitest",
@@ -50,6 +52,7 @@
5052
"eslint-plugin-promise": "^6.1.1",
5153
"eslint-plugin-react": "^7.33.2",
5254
"eslint-plugin-react-hooks": "^4.6.0",
55+
"gh-pages": "^6.3.0",
5356
"jsdom": "^23.0.1",
5457
"postcss": "^8.4.32",
5558
"rollup-plugin-visualizer": "^6.0.5",

vite.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import path from 'path';
55
import { visualizer } from 'rollup-plugin-visualizer';
66
import compression from 'vite-plugin-compression';
77

8+
const isGhPages = process.env.VITE_DEPLOY_TARGET === 'GH_PAGES'
9+
810
// https://vitejs.dev/config/
911
export default defineConfig({
1012
plugins: [
@@ -38,9 +40,7 @@ export default defineConfig({
3840
})
3941
: null,
4042
].filter(Boolean),
41-
base: process.env.DEPLOY_ENV === 'GH_PAGES'
42-
? '/flexdevguy/'
43-
: '/',
43+
base: isGhPages ? '/grwm.dev/' : '/',
4444
build: {
4545
outDir: 'dist',
4646
// Copy public assets including robots.txt and sitemap.xml

0 commit comments

Comments
 (0)