Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Project specifics

- **Next.js 16.2.10 (stable), webpack, Cache Components on.** `cacheComponents: true` + `cacheLife: { default: sanity }` in `next.config.ts`. Do not switch to Turbopack — it doesn't run this project's Tailwind v3 PostCSS pipeline or the GLSL shader loaders. `dev`/`build` use `--webpack`.
- **Next.js 16.2.10 (stable), Turbopack, Cache Components on.** `cacheComponents: true` + `cacheLife: { default: sanity }` in `next.config.ts`. `dev`/`build` run on Turbopack (the Next 16 default — no `--webpack` flag). GLSL shaders load through `raw-loader` only, declared in `turbopack.rules` in `next.config.ts`; shaders must be plain GLSL with **no `glslify` `#pragma`** (the glslify requires were flattened into the `.glsl` files so `raw-loader` suffices). Tailwind v3 + the `postcss.config.mjs` chain (`postcss-import` → `tailwindcss/nesting` → `tailwindcss`) is verified working under Turbopack — `postcss-import` is now an explicit dep.
- **Sanity data has three fetch modes (`src/service/sanity/index.ts`) — pick by context:**
- `sanityFetch` — Live; only valid **inside a `"use cache"` scope** (its `cacheTag()` throws otherwise). For draft/preview render.
- `sanityFetchCached` — Live wrapped in `"use cache"`; the default for published page/route content. Revalidates via Sanity Live tags.
Expand Down
11 changes: 1 addition & 10 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const nextConfig: NextConfig = {
turbopack: {
rules: {
"*.{glsl,vert,frag,vs,fs}": {
loaders: ["raw-loader", "glslify-loader"],
loaders: ["raw-loader"],
as: "*.js"
}
}
Expand All @@ -32,15 +32,6 @@ const nextConfig: NextConfig = {
]
},

webpack: (config) => {
config.module.rules.push({
test: /\.(glsl|vs|fs|vert|frag)$/,
use: ["raw-loader", "glslify-loader"]
})

return config
},

async headers() {
return [
{
Expand Down
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --webpack",
"build": "next build --webpack",
"dev": "next dev",
"build": "next build",
"prettier": "prettier --write .",
"start": "next start",
"lint": "eslint src sanity next.config.ts sanity.config.ts sanity.cli.ts --ext .js,.jsx,.ts,.tsx",
Expand Down Expand Up @@ -42,8 +42,6 @@
"@vercel/speed-insights": "^1.2.0",
"clsx": "^2.1.1",
"emulators": "^8.3.9",
"glsl-noise": "^0.0.0",
"glslify-loader": "^2.0.0",
"jquery": "^3.7.1",
"js-dos": "^8.3.20",
"leva": "^0.9.35",
Expand Down Expand Up @@ -93,9 +91,8 @@
"eslint-config-prettier": "^10.1.1",
"eslint-plugin-prettier": "^5.2.3",
"eslint-plugin-simple-import-sort": "^12.1.1",
"glsl-constants": "^2.0.1",
"glslify-loader": "^2.0.0",
"postcss": "^8",
"postcss": "^8.5.10",
"postcss-import": "^16.1.1",
"postcss-nesting": "^13.0.1",
"prettier": "^3.3.3",
"prettier-plugin-glsl": "^0.2.0",
Expand Down
Loading