vue-markdown-editor icon indicating copy to clipboard operation
vue-markdown-editor copied to clipboard

nuxt3使用generate打包报错,createLineNumbertPlugin is not a function

Open cejune opened this issue 1 year ago • 3 comments

nuxt3使用generate打包报错 ERROR [nuxt] [request error] [unhandled] [500] createLineNumbertPlugin is not a function
at ./.nuxt/prerender/chunks/app/server.mjs:3330:8
at ModuleJob.run (node:internal/modules/esm/module_job:194:25) WX20231028-112309

cejune avatar Oct 28 '23 03:10 cejune

同错...

lincenying avatar Jan 26 '24 06:01 lincenying

服务端渲染是不行的,在服务端渲染不要渲染。 if (!process.server){ await nextTick(() => { VMdPreview.use(createLineNumbertPlugin()); VMdPreview.use(createCopyCodePlugin()); }) } 这样会导致第一打开文章页面会无法加载插件。如果是其他页面通过路由跳转,可以正常使用

Niushuaik avatar Mar 02 '24 12:03 Niushuaik