android port capacitor

This commit is contained in:
t0is 2025-07-09 13:33:47 +02:00
parent 3bdc967873
commit 2b9391f5e9
6 changed files with 59 additions and 21 deletions

1
.env
View File

@ -3,6 +3,7 @@ APP_ENV=local
APP_DEBUG=true
APP_NAME=vat_wms
VITE_APP_NAME="${APP_NAME}"
#VITE_DEV_SERVER_URL="http://10.0.2.2:5173"
APP_URL=http://0.0.0.0:8004
ASSET_URL=http://0.0.0.0:8004

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
/bootstrap/ssr
/node_modules
/public/build
/public/spa
/public/hot
/public/storage
/storage/*.key

15
package-lock.json generated
View File

@ -5,6 +5,7 @@
"packages": {
"": {
"dependencies": {
"@capacitor/android": "^7.4.1",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@fortawesome/fontawesome-svg-core": "^6.7.2",
@ -49,12 +50,12 @@
"autoprefixer": "^10.4.21",
"axios": "^1.8.4",
"concurrently": "^9.0.1",
"laravel-vite-plugin": "^1.2.0",
"laravel-vite-plugin": "^1.3.0",
"postcss": "^8.5.3",
"prettier": "^3.5.3",
"tailwindcss": "^4.1.6",
"typescript": "^5.8.2",
"vite": "^6.0.0"
"vite": "^6.3.5"
}
},
"node_modules/@alloc/quick-lru": {
@ -371,6 +372,15 @@
"node": ">=6.9.0"
}
},
"node_modules/@capacitor/android": {
"version": "7.4.1",
"resolved": "https://registry.npmjs.org/@capacitor/android/-/android-7.4.1.tgz",
"integrity": "sha512-/LxreKsXt6oZnS7gOpHz2WvRuZzwaLpGOKqomvBTliISTQaKEwqLkX1k665fqZquuJjP8RKnkz8thO6UZJTfbg==",
"license": "MIT",
"peerDependencies": {
"@capacitor/core": "^7.4.0"
}
},
"node_modules/@capacitor/cli": {
"version": "7.4.1",
"resolved": "https://registry.npmjs.org/@capacitor/cli/-/cli-7.4.1.tgz",
@ -506,7 +516,6 @@
"version": "7.4.1",
"resolved": "https://registry.npmjs.org/@capacitor/core/-/core-7.4.1.tgz",
"integrity": "sha512-0ap4FzPJItaeg3QiiS1WguPNHY2aD67fQ9wr7DojCRzTFuNXQPvFB6lBkqlrVeQyJ9jCw0KV/LXv25oXjDcsyA==",
"dev": true,
"license": "MIT",
"dependencies": {
"tslib": "^2.1.0"

View File

@ -2,7 +2,7 @@
"private": true,
"type": "module",
"scripts": {
"build": "vite build && vite build --ssr",
"build": "vite build",
"dev": "vite"
},
"devDependencies": {
@ -20,14 +20,15 @@
"autoprefixer": "^10.4.21",
"axios": "^1.8.4",
"concurrently": "^9.0.1",
"laravel-vite-plugin": "^1.2.0",
"laravel-vite-plugin": "^1.3.0",
"postcss": "^8.5.3",
"prettier": "^3.5.3",
"tailwindcss": "^4.1.6",
"typescript": "^5.8.2",
"vite": "^6.0.0"
"vite": "^6.3.5"
},
"dependencies": {
"@capacitor/android": "^7.4.1",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@fortawesome/fontawesome-svg-core": "^6.7.2",

View File

@ -305,6 +305,24 @@ export default function AppLayout({
>
Dashboard
</ResponsiveNavLink>
<ResponsiveNavLink
href={route('stock')}
active={route().current('stock')}
>
Stock
</ResponsiveNavLink>
<ResponsiveNavLink
href={route('batches')}
active={route().current('batches')}
>
Batches
</ResponsiveNavLink>
<ResponsiveNavLink
href={route('pdaView')}
active={route().current('pdaView')}
>
PDA
</ResponsiveNavLink>
</div>
{/* <!-- Responsive Settings Options --> */}

View File

@ -6,17 +6,25 @@ export default defineConfig({
plugins: [
laravel({
input: 'resources/js/app.tsx',
// ssr: 'resources/js/ssr.tsx',
refresh: true,
}),
react(),
],
resolve: {
alias: {
'@': '/resources/js',
base: './',
resolve: { alias: { '@': '/resources/js' } },
build: {
outDir: 'public/spa',
emptyOutDir: true,
},
server: {
host: '0.0.0.0',
port: 5173,
strictPort: true,
// Allow crossorigin requests from your Laravel app:
cors: true,
hmr: {
host: '10.0.2.2',
port: 5173,
},
},
// ssr: {
// noExternal: ['@inertiajs/server'],
// },
});