Skip to content

Commit 63e5bf2

Browse files
next.config.ts と footer.tsx を更新: webpack-license-plugin とフッターナビゲーションを追加
Agent-Logs-Url: https://github.com/ut-code/my-code/sessions/be9aa412-b6e0-4632-bb0b-aaac5aea1874 Co-authored-by: na-trium-144 <100704180+na-trium-144@users.noreply.github.com>
1 parent 4675b1e commit 63e5bf2

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

app/footer.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import Link from "next/link";
2+
13
export function Footer() {
24
return (
35
<footer className="footer sm:footer-horizontal bg-neutral text-neutral-content p-10 z-30">
@@ -43,6 +45,26 @@ export function Footer() {
4345
公式 𝕏 アカウント
4446
</a>
4547
</nav>
48+
<nav>
49+
<h6 className="footer-title normal-case">my.code(); について</h6>
50+
<Link href="/about/runtime" className="link link-hover">
51+
コード実行環境について
52+
</Link>
53+
<Link href="/about/ai" className="link link-hover">
54+
AI質問機能について
55+
</Link>
56+
<Link href="/about/license" className="link link-hover">
57+
ライセンス
58+
</Link>
59+
<a
60+
className="link link-hover"
61+
href="https://forms.gle/XXXXXXXXXXXXXXXX"
62+
target="_blank"
63+
rel="noopener noreferrer"
64+
>
65+
お問い合わせ
66+
</a>
67+
</nav>
4668
</footer>
4769
);
4870
}

next.config.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { NextConfig } from "next";
22
import { initOpenNextCloudflareForDev } from "@opennextjs/cloudflare";
33
import { PyodidePlugin } from "@pyodide/webpack-plugin";
44
import { version as pyodideVersion } from "pyodide/package.json";
5+
import LicensePlugin from "webpack-license-plugin";
56

67
initOpenNextCloudflareForDev();
78

@@ -42,7 +43,7 @@ const nextConfig: NextConfig = {
4243
},
4344
];
4445
},
45-
webpack: (config) => {
46+
webpack: (config, { isServer }) => {
4647
config.plugins.push(
4748
new PyodidePlugin({
4849
// public/ 以下に書き出すと404
@@ -68,6 +69,12 @@ const nextConfig: NextConfig = {
6869
resourceQuery: /raw/,
6970
type: "asset/source",
7071
});
72+
// クライアントビルドのみサードパーティライセンスを /_next/static/oss-licenses.json に出力
73+
if (!isServer) {
74+
config.plugins.push(
75+
new LicensePlugin({ outputFilename: "static/oss-licenses.json" })
76+
);
77+
}
7178
return config;
7279
},
7380
async redirects() {

0 commit comments

Comments
 (0)