mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
In #86014 we added a validation for exporting object and array literals from `'use cache'` files. This was a bit too restrictive, and short-sighted, as it would prevent exporting common things like metadata or viewport objects from page and layout files, if the file uses a `'use cache'` top-level directive.
5 lines
82 B
JavaScript
5 lines
82 B
JavaScript
// Should not get cache runtime wrappers.
|
|
export const foo = {}, bar = [
|
|
1
|
|
];
|