MENU
manifest.json
A web application manifest, as defined by the Web Application Manifest specification, is a JSON file that provides essential details about a web application.
Its primary purpose is to supply the browser with information needed to install a Progressive Web App (PWA) on a device, such as the app's name and icon.
Add or generate a manifest.(json|webmanifest) file in the root of app directory to provide information about your web application for the browser.
For information on all the current options, refer to the MDN docs.
manifest.js is a special Route Handler that is cached by default unless it utilizes a dynamic API or a dynamic configuration option.
manifest.ts:
manifest.webmanifest:
manifest.ts:
import type { MetadataRoute } from 'next'
export default function manifest(): MetadataRoute.Manifest {
return {
name: 'My Next.js Application',
short_name: 'Next.js App',
description: 'An application built with Next.js',
start_url: '/',
display: 'standalone',
background_color: '#fff',
theme_color: '#fff',
icons: [
{
src: '/favicon.ico',
sizes: 'any',
type: 'image/x-icon',
},
],
}
}manifest.webmanifest:
{
"name": "My Next.js Application",
"short_name": "Next.js App",
"description": "An application built with Next.js",
"start_url": "/"
// ...
}