You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copied directly from example, except added braces around the remark import.
What you did:
Ran the code.
What happened:
Nothing. The output simply created two <p> tags, rather than the embed.
Problem description:
When doing import remarkEmbedder from '@remark-embedder/core' you actually get an object with a single property: default, which then actually contains the function. When passed to unified, this does nothing. In order to use it, you must instead write remarkEmbedder.default, which is rather counterintuitive.
Suggested solution:
Change the build system to include ESM code, for importing.
The text was updated successfully, but these errors were encountered:
Running into the same issue. I think the solution would be to either expose an ESM entry point or maybe different type definitions somehow? Not sure exactly
remark-embedder-core
version: 3.0.1node
version: 18.4.0npm
version: 8.13.0Relevant code or config
Copied directly from example, except added braces around the
remark
import.What you did:
Ran the code.
What happened:
Nothing. The output simply created two
<p>
tags, rather than the embed.Problem description:
When doing
import remarkEmbedder from '@remark-embedder/core'
you actually get an object with a single property:default
, which then actually contains the function. When passed tounified
, this does nothing. In order to use it, you must instead writeremarkEmbedder.default
, which is rather counterintuitive.Suggested solution:
Change the build system to include ESM code, for importing.
The text was updated successfully, but these errors were encountered: