mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### What Change from processing the file with `next-metatdata-route-loader` directly into passing the file as loader query, and leave an empty resource file for it. This will resolve the error that users were seeing with `manifest.json` convention. ``` Import trace for requested module: ../../../../packages/next/dist/build/webpack/loaders/next-metadata-route-loader.js?page=%2Fmanifest.jso n%2Froute&isDynamic=0!./app/manifest.json?__next_metadata_route__ getStaticAssetRouteCode page /manifest.json/route this.resourcePath /Users/huozhi/workspace/next.js/tes t/e2e/app-dir/metadata-json-manifest/app/manifest.json ``` ### Why I looked at the loader process that the final resource processed by webpack is `json!next-metadata-route-loader...`, which means the builtin json loader processing json file after the metadata route loader. I didn't get chance to solve the ordering issue, so I changed the resourcePath to empty "", and pass the file path as query into the loader to avoid json-loader processing it after transpilation. Fixes #59923 Closes NEXT-2630 Closes NEXT-2439
13 lines
219 B
JavaScript
13 lines
219 B
JavaScript
export const metadata = {
|
|
title: 'Next.js',
|
|
description: 'Generated by Next.js',
|
|
}
|
|
|
|
export default function RootLayout({ children }) {
|
|
return (
|
|
<html lang="en">
|
|
<body>{children}</body>
|
|
</html>
|
|
)
|
|
}
|