Closed agamemnus closed 5 years ago
@agamemnus sorry for the late response; holidays and all that.
We've mainly been using this with babel and using import
so we hadn't noticed the issue! It looks like what you're experiencing is described here.
Instead of modifying the source code, you should also be able to use:
var middleware = require('adorable-avatars').default;
Could you verify that when you have a moment?
I"m going to leave this open until we've fixed the issue; I believe something as simple as https://www.npmjs.com/package/babel-plugin-add-module-exports should do the trick.
I tried that and it didn't work, I think. I ended up just using your server code wholesale (maybe with a couple minor adjustments, like port number). Thank you for sharing this avatar generator!
But if I have time I will try it again.
@agamemnus sure thing; I was playing with it in runkit and found that to be the case: https://runkit.com/rylnd/5c378920bc4c1d0013310b67
@agamemnus as you probably saw, 0.2.2 was just released. The intention is that it should address this problem; please reopen the issue if it does not.
idk
Needed to add
module.exports = router;
aftervar router = (0, _express2.default)();
indist/routes/avatars.js
.