Skip to content

ogygia error

macro_in_markup

‹file› — import.meta.og.‹macro›() sits in ‹place›, where `‹plugin›` does not compile it: it would reach the page as is and fail there.

A plugin's import.meta.og.* macro is compiled where the module's code is: a JS or TS module, and the <script> of a .svelte component (image() compiles a markdown page's <script> too). A call in a template expression ({…} in markup or in a markdown page's prose), or in a markdown page's <script> for a macro that does not compile there, is not rewritten. Call the macro in the component's <script> (or in a .ts module it imports) and use its value in the markup. A call written as text (a code span, fenced code, plain prose) is no call and needs no change.

Every error and warning