Open Benbinbin opened 2 years ago
Here is a debug memo.
Nuxt Content v2 dynamically import
s plugins without resolving Nuxt aliases, so they are assumed to be inside node_modules
.
Nuxt Content v1 resolves aliases by resolver:
@NozomuIkuta How to solve it then?
@Benbinbin
In the BlogiNote link you shared, we don't need to actually publish the plugin to npm, right?
Just use the plugin offline and just change the link in the Package.json to file:...
and then Content Module will be able to pick it up, right?
@ManasMadrecha yep, you're right
@Benbinbin Amazing! BTW, your website's Table of Contents is just next level. It's magical... ๐ฎ๐๐ป
Seems quite inconvenient for one-time, project-specific plugins. Is there not a syntax for importing local plugins?
Seems quite inconvenient for one-time, project-specific plugins. Is there not a syntax for importing local plugins?
@innocenzi maybe the hook content:file:afterParse
provided by Nuxt Content is the alternative solution for remark or rehype plugin
@Benbinbin But the hook content:file:afterParse works as only rehype
plugin and not remark
plugin. Still, need to install a local remark plugin as npm module ๐ฎโ๐จ
Are there news about this regression ?
Environment
Windows_NT
v16.13.1
3.0.0-rc.6
npm@8.1.2
vite
app
,typescript
,modules
,colorMode
,content
@nuxt/content@2.1.0-27639343.b832f24
,@nuxtjs/tailwindcss@5.3.0
,@nuxtjs/color-mode@3.1.4
-
Reproduction
https://github.com/Benbinbin/nuxt-content-local-remark-plugin
Describe the bug
The former documentation show how to use the local remark plugin, like
~/markdownPlugins/remark-plugin.js
but the new documentation delete this part
when I use the same syntax which is mentioned at the old documentation
but then I get an error (see th Logs part ๐ ) it recognizes the local remark plugin file as a package?
maybe the old documentation just suitable for content v1, any new way to add local remark plugin for content v2?
Additional context
some relative issues about plugin:
1226
1212
Logs