Replies: 2 comments
-
pretty sure you can't run discord.js in a web browser anyways |
Beta Was this translation helpful? Give feedback.
-
As I understand it, I had a similar problem, I'm not sure that this solution will work for you, but still: Now I am making an extension "Crypto", which needs a CryptoJS library with a modular structure. But all extensions should completely fit in its own single file without referring to the others (which is confirmed by the box2d code). This is solved in a rather banal way - to fit all the modules in one file, and put its code in the extension. Yes, it's very ugly, but it's the only working option. CryptoJS has a file |
Beta Was this translation helpful? Give feedback.
-
Is there any way to use the require() or import from in the extension. As far as I know, browsers don't support require() and import needs to have type="module" in the script tag. I would appreciate any help on how to import a module. I want to import discord.js specifically
Beta Was this translation helpful? Give feedback.
All reactions