Skip to content

ogygia error

macro_source_misuse

‹file›:‹line› — ‹problem›. import.meta.og.source is legal in exactly one position: `export const <name> = import.meta.og.source(fn)` (optionally `(fn, { key })`) at module top level. The compiler stamps the source id from that export's identity.

import.meta.og.source declares a data source. Its id is the file and export name it is declared under, so the build only accepts it as the initializer of a top-level export const: export const loadThing = import.meta.og.source(fn).

problem names what was written instead. Declare the source as its own exported constant.

Every error and warning