With Node.js 13.7.0 we finally have a standard way to make dual-packages which support both ESM and CJS with backwards compatibility with older Node.js versions, via conditional exports.
import foo from 'bar/module.mjs';).
Obviously nobody wants to write these out manually, but this presents some new challenges for transpilers, which unfortunately no transpilers have yet tried to solve.
So what can we do about this?
Recently I published a new open-source webpack loader named
smart-source-map-loader to enable Webpack to load the source maps from existing compiled code. Now you might be thinking, there’s already a loader for that, what makes this alternative “smart”?
Necessity is the mother of pull requests, so that’s what I did.
It’s not every day you get to release a freelance project as open source, but in this case I’m pleased to be able to release flshm as open source on GitHub.
This project was developed for a client who wanted to add some new features to an existing Flash-based project, but was running into some limitations due to the sand-boxing features which are even present when publishing a desktop application.
UPDATE: This is now obsolete, with the adoption of WebExtensions.
Now that Firefox has built-in developer tools, it makes sense for developer add-ons integrate with them. MDN has some examples on creating a developer tools panel, but the examples do not look anything like the built-in tools, and do not offer any information on how to do so.
If you ever wanted to use scroll events in your web app, you’ve probably found what a mess it is. I know I did when I was developing the theme used on this website. There are snippets out there to try to resolve legacy browser issues, but all of them are half-baked and missing basic functionality such as proper feature-detection and the ability to remove an event listener. All of these issues seems simple, but are actually quite complex to implement properly, and without memory leaks.
We can do better! That’s why I created this library.
Recently I decided to try out webpack as a replacement for Browserify, and it didn’t disappoint! Out-of-the-box, webpack even support’s AMD, so RequireJS-based libraries can be used as-is. This got me thinking, jQuery switched to RequireJS a while back for their source code and build process, so I questioned:
Could webpack be used to load individual jQuery modules?