-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ES Modules? #34
Comments
I don't really see the point. webmention.js is already largely just running a single function on a single piece of external data and I don't see what this would help with. If this were a react module or something I'd maybe consider it except there's already react-based webmention display implementations and I just want this to stay simple and concise. |
Hm, but being wrapped inside an IIFE, it's hard to run automated tests against it. |
Automated testing isn't a high priority for me. I won't turn down work that others do in that regard but this project was just a quick hack for me to add webmention display to my site. |
Totally slipped my memory :O I'm currently looking into migrating things over to my own VPS and might pick up contributions here as a consequence. |
As result of #25 I was thinking about splitting the code into ES Modules. Hear me out :)
It has a good support by now: https://caniuse.com/es6-module
You can offer an IIFE version for browsers that don't understand it: https://jakearchibald.com/2017/es-modules-in-browsers/#nomodule-for-backwards-compatibility
Downside is likely the need of a bundler to collect all ES Modules for a single IIFE.
You could use Parcel, esbuild (the new kid on the block) or go with something more tried & tested like rollup here.
I'm a big fan of Rollup, but haven't used esbuild, yet.
Parcel is great - until you want to do things different.
The text was updated successfully, but these errors were encountered: