Skip to content

Commit

Permalink
feat: support vercel
Browse files Browse the repository at this point in the history
  • Loading branch information
MiraHikari committed Oct 6, 2024
1 parent 0292948 commit 55ce248
Show file tree
Hide file tree
Showing 8 changed files with 482 additions and 232 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ pnpm-debug.log*
# local folders
.history
.wrangler

.vercel
33 changes: 18 additions & 15 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
// @ts-check
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import astroIcon from 'astro-icon'

import astroIcon from 'astro-icon';
import playformCompress from "@playform/compress";

// https://astro.build/config
export default defineConfig({
integrations: [tailwind(), astroIcon({
include: {
mdi: ["*"],
'ri': ['*'],
'simple-icons': ['*'],
},
}), playformCompress({
CSS: false,
Image: false,
Action: {
Passed: async () => true, // https://github.com/PlayForm/Compress/issues/376
},
})],
integrations: [
tailwind(),
astroIcon({
include: {
mdi: ["*"],
'ri': ['*'],
'simple-icons': ['*'],
},
}),
playformCompress({
CSS: false,
Image: false,
Action: {
Passed: async () => true, // https://github.com/PlayForm/Compress/issues/376
},
})
],
});
30 changes: 30 additions & 0 deletions astro.config.vercel.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// @ts-check
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import astroIcon from 'astro-icon';
import vercel from "@astrojs/vercel/static";
import playformCompress from "@playform/compress";

// https://astro.build/config
export default defineConfig({
integrations: [
tailwind(),
astroIcon({
include: {
mdi: ["*"],
'ri': ['*'],
'simple-icons': ['*'],
},
}),
playformCompress({
CSS: false,
Image: false,
Action: {
Passed: async () => true, // https://github.com/PlayForm/Compress/issues/376
},
})
],
outDir: 'dist',
output: 'static',
adapter: vercel()
});
7 changes: 7 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[build.environment]
NETLIFY_USE_PNPM = "true"
NODE_VERSION = "18"

[build]
command = "OUTPUT=netlify astro build"
publish = "dist"
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "rimraf ./dist && astro check && astro build",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro",
"deploy": "astro build && wrangler pages deploy"
"deploy:vercel": "vercel deploy"
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/cloudflare": "^11.1.0",
"@astrojs/tailwind": "^5.1.1",
"@astrojs/vercel": "^7.8.1",
"@fancyapps/ui": "^5.0.36",
"@iconify-json/mdi": "^1.2.0",
"@iconify-json/ri": "^1.2.0",
"@iconify-json/simple-icons": "^1.2.5",
"@playform/compress": "^0.1.1",
"astro": "4.15.11",
"astro-font-picker": "^0.2.1",
"astro-icon": "^1.1.1",
"hotkeypad": "0.1.1",
"prettier-plugin-tailwindcss": "^0.6.8",
Expand Down
Loading

0 comments on commit 55ce248

Please sign in to comment.