I am trying to use strophe.js with relay-starter-kit . I checked relay-starter-kit , added "strophe": "^1.2.2" to package.json and ran npm install .
I cannot find how to import strophe without errors. If I just try import Strophe from 'strophe'; I get errors that webpack cannot solve strophe-polyfill . I added a solution alias pointing to the main strophe.js file, but that didn't help (I just get the console message Uncaught ReferenceError: Strophe is not defined ).
There seems to be some weird modular system in the stanza (it mentions AMD on github, but I thought it meant I could just require , but apparently not). All the examples I've seen import into an HTML file and clutter up the global namespace. I need to use it from the inside out, so I donβt think it will work.
How to import strophe for use in my es6 files?
source share