diff --git a/docs/content/1.guide/6.assets.md b/docs/content/1.guide/6.assets.md index cc2d846889..c7ecd0094c 100644 --- a/docs/content/1.guide/6.assets.md +++ b/docs/content/1.guide/6.assets.md @@ -106,7 +106,7 @@ import { defineNitroConfig } from 'nitropack' export default defineNitroConfig({ serverAssets: [{ baseName: 'templates', - dir: './server/templates' + dir: './templates' // Relative to `srcDir` (`server/` for nuxt) }] }) ``` @@ -115,7 +115,7 @@ export default defineNuxtConfig({ nitro: { serverAssets: [{ baseName: 'templates', - dir: './server/templates' + dir: './templates' // Relative to `srcDir` (`server/` for nuxt) }] } }) @@ -126,5 +126,7 @@ export default defineNuxtConfig({ // routes/success.ts export default defineEventHandler(async (event) => { return await useStorage().getItem(`assets/templates/success.html`) + // or + return await useStorage('assets:templates').getItem(`success.html`) }) ```