Closed landakram closed 3 years ago
I'm using this plugin with a project built on top of Dendron, nuxt and Nuxt Content. It needs a default export to work here.
in nuxt.config.js
export default {
content: {
markdown:{
remarkPlugins: ['remark-wiki-link'],
}
}
An update here to make it integrate seamlessly would be great :)
Apologies, I haven't had time to fix this yet. But the problem is that, when I upgraded to support breaking changes in unified, I decided to use rollup to support both cjs and esm module systems and ran into this issue. Essentially, default exports don't work well in esm and so rollup disallows them. So I removed the default export since I wanted to maintain maximum compatibility with different JS environments. Unfortunately, the remark/unified ecosystem is built around default exports, so the decision doesn't make much sense in retrospect.
I think only supporting cjs and providing a default export is a fine solution. If you or anyone else reading are able to make a fix, I would encourage and appreciate that. Otherwise, I will hopefully get to this soon.
Closed by https://github.com/landakram/remark-wiki-link/pull/17, released in 1.0.4
In https://github.com/landakram/remark-wiki-link/pull/6, I removed the default import to prevent a warning in rollup. Almost all of the
remark-*
tools use a default import, so it's a little unexpected for people. It also fails silently.Change the import to use a default import.
See: