diff --git a/next.config.js b/next.config.ts similarity index 83% rename from next.config.js rename to next.config.ts index 51929b3b..6c582f48 100644 --- a/next.config.js +++ b/next.config.ts @@ -1,4 +1,6 @@ -module.exports = { +import type { NextConfig } from "next"; + +const nextConfig: NextConfig = { images: { remotePatterns: [ { @@ -30,3 +32,5 @@ module.exports = { ]; }, }; + +export default nextConfig; diff --git a/tina/config.tsx b/tina/config.tsx index b8e2c2f1..ea7947d0 100644 --- a/tina/config.tsx +++ b/tina/config.tsx @@ -1,4 +1,5 @@ import { defineConfig } from "tinacms"; +import nextConfig from "../next.config"; import Post from "./collection/post"; import Global from "./collection/global"; @@ -27,6 +28,7 @@ const config = defineConfig({ build: { publicFolder: "public", // The public asset folder for your framework outputFolder: "admin", // within the public folder + basePath: nextConfig.basePath || "", }, schema: { collections: [Page, Post, Author, Global],