mirror of
https://github.com/ershisan99/DevToysWeb.git
synced 2025-12-16 04:59:24 +00:00
perf!: hosting on firebase as static files
BREAKING CHANGE: not-found page is now Next.js default
This commit is contained in:
@@ -3,3 +3,4 @@ dist/*
|
||||
public
|
||||
node_modules
|
||||
*.esm.js
|
||||
out
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -36,3 +36,7 @@ tsconfig.tsbuildinfo
|
||||
|
||||
# eslint
|
||||
.eslintcache
|
||||
|
||||
# firebase
|
||||
.firebase
|
||||
firebase-debug.log
|
||||
|
||||
@@ -9,3 +9,4 @@ node_modules
|
||||
build
|
||||
.contentlayer
|
||||
pnpm-lock.yaml
|
||||
out
|
||||
|
||||
@@ -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)
|
||||
|
||||
37
firebase.json
Normal file
37
firebase.json
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
output: "export",
|
||||
reactStrictMode: true,
|
||||
experimental: {
|
||||
typedRoutes: true,
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user