chore: add vercel adapter, fix vercel dev mode

This commit is contained in:
Corbin Crutchley
2023-07-09 16:37:41 -07:00
parent d88bfc2719
commit 094220a795
5 changed files with 8014 additions and 1095 deletions

2
.gitignore vendored
View File

@@ -21,3 +21,5 @@ pnpm-debug.log*
.eslintcache
.vercel
.puppeteer
.vercel

View File

@@ -12,6 +12,7 @@ import preact from "@astrojs/preact";
import sitemap from "@astrojs/sitemap";
import { EnumChangefreq as ChangeFreq } from "sitemap";
import { siteUrl } from "./src/constants/site-config";
import vercel from "@astrojs/vercel/static";
// TODO: Create types
import behead from "remark-behead";
@@ -26,6 +27,7 @@ await symlink(path.resolve("content"), path.resolve("public/content"));
export default defineConfig({
site: siteUrl,
adapter: vercel(),
integrations: [
image(),
preact({ compat: true }),

9074
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -44,28 +44,28 @@
"@astrojs/mdx": "^0.19.7",
"@astrojs/preact": "^2.2.1",
"@astrojs/sitemap": "^1.3.3",
"@lesjoursfr/html-to-epub": "^4.0.0",
"@remark-embedder/core": "^3.0.1",
"@lesjoursfr/html-to-epub": "^4.0.1",
"@remark-embedder/core": "^3.0.2",
"@remark-embedder/transformer-oembed": "^3.0.0",
"@testing-library/dom": "^9.3.1",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/preact": "^3.2.3",
"@types/jest": "^29.4.0",
"@types/jest": "^29.5.2",
"@types/json5": "^2.2.0",
"@types/node": "^18.13.0",
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "^5.60.0",
"@typescript-eslint/parser": "^5.60.0",
"@vercel/node": "^2.15.2",
"astro": "^2.7.0",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"@vercel/node": "^2.15.3",
"astro": "^2.8.0",
"astro-icon": "^0.8.1",
"autoprefixer": "^10.4.14",
"classnames": "^2.3.2",
"dayjs": "^1.11.8",
"dayjs": "^1.11.9",
"env-cmd": "^10.1.0",
"esbuild": "^0.18.7",
"esbuild-jest": "^0.5.0",
"eslint": "^8.43.0",
"eslint": "^8.44.0",
"eslint-plugin-astro": "^0.27.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"feed": "^4.2.2",
@@ -78,13 +78,13 @@
"hastscript": "^7.2.0",
"husky": "^8.0.3",
"image-size": "^1.0.2",
"jest-environment-jsdom": "^29.5.0",
"jest-environment-jsdom": "^29.6.1",
"jest-watch-typeahead": "^2.2.2",
"json5": "^2.2.3",
"junk": "^4.0.1",
"lint-staged": "^13.2.2",
"lint-staged": "^13.2.3",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.24",
"postcss": "^8.4.25",
"postcss-csso": "^6.0.1",
"preact-render-to-string": "^6.1.0",
"prettier": "^2.8.8",
@@ -102,7 +102,7 @@
"sass": "^1.63.6",
"sitemap": "^7.1.1",
"symlink-dir": "^5.1.1",
"terser": "^5.18.1",
"terser": "^5.18.2",
"tsx": "^3.12.7",
"typescript": "^4.9.5",
"unified": "^10.1.2",
@@ -110,6 +110,7 @@
"unist-util-is": "^5.2.1",
"unist-util-replace-all-between": "^0.1.1",
"unist-util-visit": "^4.1.2",
"vercel": "^31.0.1",
"vite-plugin-svgr": "^3.2.0"
},
"lint-staged": {
@@ -117,9 +118,10 @@
"*.{js,ts,astro,jsx}": "prettier --write"
},
"dependencies": {
"@astrojs/vercel": "^3.7.0",
"@floating-ui/react": "^0.24.3",
"medium-zoom": "^1.0.8",
"preact": "^10.15.1"
"preact": "^10.16.0"
},
"overrides": {
"react": "npm:@preact/compat@latest",

View File

@@ -1,5 +1,4 @@
{
"devCommand": "npm run dev",
"cleanUrls": true,
"redirects": [
{