Skip to content

Commit

Permalink
SolidStart 셋업 및 /opengraph.png 라우트 포팅
Browse files Browse the repository at this point in the history
  • Loading branch information
XiNiHa committed May 22, 2024
1 parent deeb686 commit f1b0903
Show file tree
Hide file tree
Showing 17 changed files with 3,387 additions and 128 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
node_modules
.astro
.vercel
.vinxi
dist
tmp
.DS_Store
33 changes: 33 additions & 0 deletions app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { readFile } from "node:fs/promises";

import yaml from "@rollup/plugin-yaml";
import { defineConfig } from "@solidjs/start/config";
import unocss from "unocss/vite";

// 현재 Vinxi export 설정 이슈로 파일을 직접 가져와야 함
import type { CustomizableConfig } from "./node_modules/vinxi/dist/types/lib/vite-dev";

export default defineConfig({
server: {
preset: "vercel",
},
vite: {
plugins: [
yaml(),
unocss(),
{
name: "base64-loader",
async transform(_, id) {
const [path, query] = id.split("?");
if (query !== "base64" || !path) return null;
const data = await readFile(path);
const base64 = data.toString("base64");
return `export default '${base64}';`;
},
},
],
} satisfies CustomizableConfig,
solid: {
exclude: ["./src/misc/opengraph/**/*"],
},
});
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,15 @@
"license": "AGPL-3.0-or-later",
"repository": "https://github.com/portone-io/developers.portone.io",
"scripts": {
"dev": "vinxi dev",
"build": "vinxi build",
"start": "vinxi start",
"version": "vinxi version",
"check": "pnpm lint",
"lint:fix": "NODE_OPTIONS=\"$NODE_OPTIONS --loader ts-node/esm\" eslint --fix .",
"lint": "NODE_OPTIONS=\"$NODE_OPTIONS --loader ts-node/esm\" eslint .",
"eslint": "NODE_OPTIONS=\"$NODE_OPTIONS --loader ts-node/esm\" eslint"
},
"imports": {
"#state/system-version": {
"node": "./src/state/system-version/server.ts",
"browser": "./src/state/system-version/client.ts",
"default": "./src/state/system-version/index.ts"
}
},
"dependencies": {
"@eslint/js": "^8.57.0",
"@iconify-json/ic": "^1.1.17",
Expand All @@ -26,6 +23,9 @@
"@rollup/plugin-yaml": "^4.1.2",
"@shikijs/rehype": "^1.3.0",
"@shikijs/transformers": "^1.3.0",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.13.3",
"@solidjs/start": "^1.0.0",
"@total-typescript/ts-reset": "^0.5.1",
"@types/eslint": "^8.56.6",
"@types/eslint__js": "^8.42.3",
Expand Down Expand Up @@ -116,6 +116,7 @@
"remark-rehype": "^11.1.0",
"satori": "^0.10.13",
"sharp": "^0.33.3",
"solid-js": "^1.8.17",
"string-width": "^5.1.2",
"ts-node": "^10.9.2",
"ts-pattern": "^5.1.1",
Expand All @@ -124,6 +125,7 @@
"unist-util-visit": "^5.0.0",
"universal-cookie": "^7.1.4",
"unocss": "^0.59.4",
"vinxi": "^0.3.11",
"yaml-eslint-parser": "^1.2.2"
},
"packageManager": "[email protected]",
Expand Down
Loading

0 comments on commit f1b0903

Please sign in to comment.