fix: restore aliased paths to vite config

This commit is contained in:
Dan Ditomaso
2025-03-06 14:28:07 -05:00
parent d379769672
commit d54a612e0b
4 changed files with 37 additions and 13 deletions
+11
View File
@@ -2,6 +2,7 @@ import { defineConfig } from "vite";
import react from '@vitejs/plugin-react';
import { VitePWA } from 'vite-plugin-pwa';
import { execSync } from 'node:child_process';
import path from "node:path";
let hash = '';
try {
@@ -29,6 +30,16 @@ export default defineConfig({
define: {
'import.meta.env.VITE_COMMIT_HASH': JSON.stringify(hash),
},
resolve: {
alias: {
// Using Node's path and process.cwd() instead of Deno.cwd()
'@app': path.resolve(process.cwd(), './src'),
'@pages': path.resolve(process.cwd(), './src/pages'),
'@components': path.resolve(process.cwd(), './src/components'),
'@core': path.resolve(process.cwd(), './src/core'),
'@layouts': path.resolve(process.cwd(), './src/layouts'),
},
},
server: {
port: 3000
},