umputun / remark42

comment engine
https://remark42.com
MIT License
4.81k stars 374 forks source link

Failed to load module script #1727

Closed sohailAhmeddev closed 7 months ago

sohailAhmeddev commented 7 months ago

I'm trying to integrate remark42 in my next js app but was unable to do so.

image

here is my configuration <script dangerouslySetInnerHTML={{ __html: var remark_config = { host: 'http://localhost:8080', site_id: 'remark', components:['embed'] } }}

<script dangerouslySetInnerHTML={{ __html: !function (e, n) { for (var o = 0; o < e.length; o++) { var r = n.createElement("script"), c = ".js", // Update the file extension to ".mjs" d = n.head || n.body; "noModule" in r ? (r.type = "module") : (r.async = !0), (r.defer = !0), (r.src = remark_config.host + "/web/" + e[o] + c), d.appendChild(r); } }(remark_config.components || ["embed"], document);, }}