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.
6 lines
90 B
JavaScript
6 lines
90 B
JavaScript
'use cache'
|
|
|
|
// Should not get cache runtime wrappers.
|
|
export const foo = {},
|
|
bar = [1]
|