Files
raphaelsalaja__userinterfac…/next.config.mjs
Raphael Salaja b0c89649b1 feat: new article animate presence (#7)
* feat: add AnimatePresence article with interactive playground

* feat: add playground

* feat: ƒix basic demo

* feat: ap article start

* chore: cleanup

* chore: pre-commit

* feat: update article

* refactor: improve code formatting and readability in demo and script files

* refactor: enhance formatting for improved readability in slideshow demo

* chore: generate open graph rather than dynamically

* chore: add @clack/prompts dependency and enhance icon/image generation scripts with improved logging

* refactor: generators

* chore: cleanup

* feat: refactor generator

* feat: second draft

* docs: final draft

* chore: final draft again

* chore: update publication date and enhance text-to-speech generator with alignment data
2026-01-25 22:41:51 +00:00

82 lines
1.5 KiB
JavaScript

import { createMDX } from "fumadocs-mdx/next";
/** @type {import('next').NextConfig} */
const config = {
compress: true,
typedRoutes: true,
reactCompiler: true,
reactStrictMode: true,
devIndicators: {
position: "bottom-right",
},
experimental: {
viewTransition: true,
},
images: {
formats: ["image/avif", "image/webp"],
minimumCacheTTL: 31536000,
localPatterns: [
{
pathname: "/assets/**",
search: "",
},
],
},
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: [
{
loader: "@svgr/webpack",
options: {
svgo: false,
},
},
],
});
// Support .txt imports for playground source files
config.module.rules.push({
test: /\.(tsx|css)\.txt$/,
type: "asset/source",
});
return config;
},
async headers() {
return [
{
source: "/fonts/(.*)",
headers: [
{
key: "Cache-Control",
value: "public, max-age=31536000, immutable",
},
],
},
{
source: "/(.*)",
headers: [
{
key: "X-Content-Type-Options",
value: "nosniff",
},
{
key: "X-Frame-Options",
value: "DENY",
},
{
key: "X-XSS-Protection",
value: "1; mode=block",
},
],
},
];
},
};
const withMDX = createMDX({});
export default withMDX(config);