diff --git a/deploy/nginx-admin.conf b/deploy/nginx-admin.conf
new file mode 100644
index 0000000..748341e
--- /dev/null
+++ b/deploy/nginx-admin.conf
@@ -0,0 +1,17 @@
+# Example: admin panel at https://parche.montech.ir/admin/
+# Place dist/ contents in the server path mapped to /admin/
+
+location /admin/ {
+ alias /var/www/parche/admin/;
+ try_files $uri $uri/ /admin/index.html;
+}
+
+location ~ ^/admin/assets/ {
+ alias /var/www/parche/admin/assets/;
+ expires 7d;
+ add_header Cache-Control "public, immutable";
+ types {
+ application/javascript js;
+ text/css css;
+ }
+}
diff --git a/index.html b/index.html
index 7c66b35..0568cae 100644
--- a/index.html
+++ b/index.html
@@ -2,7 +2,7 @@
-
+
پنل مدیریت | پَر فام بافت
diff --git a/public/.htaccess b/public/.htaccess
new file mode 100644
index 0000000..ec82b63
--- /dev/null
+++ b/public/.htaccess
@@ -0,0 +1,18 @@
+
+ RewriteEngine On
+ RewriteBase /admin/
+
+ # Serve existing files and directories
+ RewriteCond %{REQUEST_FILENAME} -f [OR]
+ RewriteCond %{REQUEST_FILENAME} -d
+ RewriteRule ^ - [L]
+
+ # SPA fallback
+ RewriteRule ^ index.html [L]
+
+
+
+ AddType application/javascript .js
+ AddType text/css .css
+ AddType application/wasm .wasm
+
diff --git a/vite.config.ts b/vite.config.ts
index ace127e..eb6b00a 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -6,15 +6,16 @@ import vueJsx from '@vitejs/plugin-vue-jsx'
import vueDevTools from 'vite-plugin-vue-devtools'
// https://vite.dev/config/
-export default defineConfig({
+export default defineConfig(({ mode }) => ({
+ base: '/admin/',
plugins: [
vue(),
vueJsx(),
- vueDevTools(),
+ ...(mode === 'development' ? [vueDevTools()] : []),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
-})
+}))