Files
homebox/frontend/nuxt.config.ts
Tonya d4e28e6f3b Upgrade frontend deps, including nuxt (#982)
* feat: begin upgrading deps, still very buggy

* feat: progress

* feat: sort all type issues

* fix: sort type issues

* fix: import sonner styles

* fix: nuxt is the enemy

* fix: try sorting issue with workflows

* fix: update vitest config for dynamic import of path and defineConfig

* fix: add missing import

* fix: add time out to try and fix issues

* fix: add ui:ci:preview task for frontend build in CI mode

* fix: i was silly

* feat: add go:ci:with-frontend task for CI mode and remove ui:ci:preview from e2e workflow

* fix: update baseURL in Playwright config for local testing to use port 7745

* fix: update E2E_BASE_URL and remove wait for timeout in login test for smoother execution
2025-09-04 09:00:25 +01:00

108 lines
2.0 KiB
TypeScript

import { defineNuxtConfig } from "nuxt/config";
// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
ssr: false,
components: {
dirs: [],
},
build: {
transpile: ["vue-i18n"],
},
modules: [
"@nuxtjs/tailwindcss",
"@pinia/nuxt",
"@vueuse/nuxt",
"@vite-pwa/nuxt",
"unplugin-icons/nuxt",
"shadcn-nuxt",
"@nuxt/eslint",
],
eslint: {
config: {},
},
nitro: {
devProxy: {
"/api": {
target: "http://localhost:7745/api",
ws: true,
changeOrigin: true,
},
},
},
app: {
head: {
script: [{ src: "/set-theme.js" }],
},
},
css: ["@/assets/css/main.css"],
pwa: {
workbox: {
navigateFallbackDenylist: [/^\/api/],
cleanupOutdatedCaches: true,
runtimeCaching: [
{
urlPattern: /^\/api/,
handler: "NetworkFirst",
method: "GET",
options: {
cacheName: "api-cache",
cacheableResponse: { statuses: [0, 200] },
expiration: { maxAgeSeconds: 60 * 60 * 24 },
},
},
],
},
registerType: "autoUpdate",
injectRegister: "script",
injectManifest: {
swSrc: "sw.js",
},
devOptions: {
// Enable to troubleshoot during development
enabled: false,
},
manifest: {
name: "Homebox",
short_name: "Homebox",
description: "Home Inventory App",
theme_color: "#5b7f67",
start_url: "/home",
icons: [
{
src: "pwa-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "any maskable",
},
],
},
},
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
compatibilityDate: "2024-11-29",
});