diff --git a/.eslintignore b/.eslintignore index dc0f9d8..dd5acd0 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,3 +3,4 @@ dist/* public node_modules *.esm.js +out diff --git a/.gitignore b/.gitignore index fa96cab..b274bde 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,7 @@ tsconfig.tsbuildinfo # eslint .eslintcache + +# firebase +.firebase +firebase-debug.log diff --git a/.prettierignore b/.prettierignore index 5536a0a..84f2918 100644 --- a/.prettierignore +++ b/.prettierignore @@ -9,3 +9,4 @@ node_modules build .contentlayer pnpm-lock.yaml +out diff --git a/README.md b/README.md index 2b51776..fcecce6 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ To reproduce environment, use [VOLTA](https://volta.sh/) ## Known issues +- [App directory root not-found.tsx not compiled to 404.html when using static export](https://github.com/vercel/next.js/issues/48227) - Tool search does not set query parameters - [(Shallow routing) updating search params causes server code to rerun.](https://github.com/vercel/next.js/issues/49668) - [Editor may not resize to fit container size](https://github.com/suren-atoyan/monaco-react/issues/346) diff --git a/firebase.json b/firebase.json new file mode 100644 index 0000000..95ae62c --- /dev/null +++ b/firebase.json @@ -0,0 +1,37 @@ +{ + "hosting": { + "public": "out", + "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], + "headers": [ + { + "source": "**", + "headers": [ + { + "key": "Cache-Control", + "value": "public, max-age=0, must-revalidate" + } + ] + }, + { + "source": "favicon.ico", + "headers": [ + { + "key": "Cache-Control", + "value": "public, max-age=3600, must-revalidate" + } + ] + }, + { + "source": "_next/static/**", + "headers": [ + { + "key": "Cache-Control", + "value": "public, max-age=31536000, immutable" + } + ] + } + ], + "cleanUrls": true, + "trailingSlash": false + } +} diff --git a/next.config.mjs b/next.config.mjs index f22df4e..fee43eb 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,5 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { + output: "export", reactStrictMode: true, experimental: { typedRoutes: true, diff --git a/package.json b/package.json index 77e7641..7bdc451 100644 --- a/package.json +++ b/package.json @@ -9,12 +9,13 @@ "dev": "next dev", "build": "next build", "analyze": "ANALYZE=true next build", - "start": "next start", + "start": "npx serve@latest out", + "deploy": "firebase deploy --project devtoysweb", "check": "pnpm typecheck && pnpm lint && pnpm format:check", "fix": "pnpm lint:fix && pnpm format:write", "lint": "next lint", "lint:fix": "next lint --fix", - "preview": "next build && next start", + "preview": "next build && npx serve@latest out", "typecheck": "tsc --noEmit", "format:write": "pnpm format --write", "format:check": "pnpm format --check",