-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Vite has its own config. Would it make sense to add one for Next.js? The reason being that Next.js requires this setup:
{
plugins: {
'react-refresh': reactRefresh,
},
rules: {
'react-refresh/only-export-components': [
'error',
{
allowConstantExport: true,
allowExportNames: ['metadata'],
},
],
},
},Next.js latest version has a convention to export these things:
export const metadata = { ... }
export const dynamic = 'force-dynamic'
export const revalidate = 60
export const runtime = 'edge'
export const fetchCache = 'force-no-store'I believe that this plugin is necessary and good even for modern Next.js 15 app router projects, at least when I read https://nextjs.org/docs/architecture/fast-refresh#limitations:
The file you're editing might have other exports in addition to a React component.
Metadata
Metadata
Assignees
Labels
No labels