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
I’m using in NextJS get static props.
Need await import because it does not support cjs?
发自我的 iPhone
在 2023年6月30日,下午6:54,Alvin Bryan ***@***.***> 写道:
- External Email -
Where are you using this? I'm not sure why you need (await import('remark-remove-comments')).default ?
—
Reply to this email directly, view it on GitHub<#7 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKQR4CGMA4R6BEM4HCECFFDXN2V4RANCNFSM6AAAAAAY36TZB4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
Notice: This email is generated from the account of an NUS alumnus. Contents, views, and opinions therein are solely those of the sender.
This plugin is not working with 'compile' in mdx-js/mdx, but okay when using it with remark.
any idea?
const jsxCode = await compileMdx(mdxWithFakeImports, {
development: false,
remarkPlugins: [
...remarkPlugins,
(await import('remark-remove-comments')).default,
(
await import('remark-gfm')
).default, //remark plugin to support GFM (autolink literals, footnotes, strikethrough, tables, tasklists).
(await import('remark-frontmatter')).default,
],
rehypePlugins: [
// Support stuff like ```js App.js {1-5} active by passing it through.
function rehypeMetaAsAttributes() {
return (tree) => {
visit(tree, 'element', (node) => {
if (node.tagName === 'code' && node.data && node.data.meta) {
node.properties.meta = node.data.meta;
}
});
};
},
],
});
The text was updated successfully, but these errors were encountered: