Fix Vite build errors and add fallback config
This commit is contained in:
parent
7b1e02588d
commit
31b2403a62
3 changed files with 30 additions and 3 deletions
|
|
@ -8,8 +8,8 @@ RUN apk add --no-cache git
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install dependencies (no lockfile needed)
|
# Install dependencies (uses package-lock if present, otherwise npm install)
|
||||||
COPY package.json ./
|
COPY package.json package-lock.json* ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
# Copy source files
|
# Copy source files
|
||||||
|
|
@ -20,7 +20,7 @@ ENV NODE_ENV=production
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# Production stage – tiny static server
|
# Production stage – tiny static server
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
|
|
||||||
12
index.html
12
index.html
|
|
@ -0,0 +1,12 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Freight Internal App</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="root"></div>
|
||||||
|
<script type="module" src="/src/main.tsx"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
15
src/App.tsx
15
src/App.tsx
|
|
@ -0,0 +1,15 @@
|
||||||
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||||
|
import LoadTable from './components/LoadTable';
|
||||||
|
|
||||||
|
const queryClient = new QueryClient();
|
||||||
|
|
||||||
|
export default function App() {
|
||||||
|
return (
|
||||||
|
<QueryClientProvider client={queryClient}>
|
||||||
|
<div className="p-4">
|
||||||
|
<h1 className="text-2xl font-bold mb-4">Freight Desk - Internal App</h1>
|
||||||
|
<LoadTable />
|
||||||
|
</div>
|
||||||
|
</QueryClientProvider>
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue