I don't attribute this to impostor syndrome.
I don't attribute this to impostor syndrome.
I feel like if I'd learned web development five years ago I wouldn't know anything about it today.
This is a wrong assumption. Web development just gives the feeling of moving fast, it's not really the case. The foundation of web development is roughly the same as 5y ago. Most things from the http protocol, web servers, data storage, authentication, websockets etc. still works the same. Give or take a few UX and state-management tools and we're not that far into the future.
Also due to the huge investments in the web during the past decade(s) things should get slower because of legacy issues. Think fe. how long it's taking browser vendors to dump Flash or to adopt WebRTC.
You can still be a generalist as long as you put those skills to the service of a specific community. This could be region, vertical, domain, etc. The important part is to be clear who are you aiming at, so you can hustle and leverage the network/reference effect in there.