Closed hacktronics closed 9 months ago
I had a similar issue with vite, the error seems to be caused by CopyButtonPlugin
not being exported in the current npm package.
You can look at https://github.com/arronhunt/highlightjs-copy/pull/13 as it should fix your issue.
In the index.js of the package add module.exports = CopyButtonPlugin
to the end of the file. Then run npx patch-package highlightjs-copy
in your terminal. Then in your js file import CopyButtonPlugin from 'highlightjs-copy'
and run hljs.addPlugin(new CopyButtonPlugin())
.
The version in npm is 1.0.3
, the latest version in GitHub is 1.0.4
. It just needs to be published by the author.
I am no longer tracking this issue, so you can close the same if required. I created my own simple copy plugin, as was running out of time.
I am no longer tracking this issue, so you can close the same if required. I created my own simple copy plugin, as was running out of time.
Can you share your code? 😁
v1.0.4 was just published, please let me know if this resolves the issues 🙏
last version still shows 1.0.3 (2 years ago)
"highlightjs-copy": "^1.0.3",
@arronhunt still 1.0.3 on npm
I still cant get this to work. The latest on npm is still 1.0.3
1.0.4 is now published. Please 👍 if this resolves the problem and I can close this issue :)
@hacktronics I'm closing this issue since we are now a few versions ahead. Please reopen if you have further problems!
Uncaught TypeError: highlightjs_copyWEBPACK_IMPORTED_MODULE3default(...) is not a function followed: