etsy / kevin-middleware

This is an Express middleware that makes developing javascript in a monorepo easier.
MIT License
110 stars 5 forks source link

fix: make getAssetName's default implementation viable #9

Closed joebeachjoebeach closed 3 years ago

joebeachjoebeach commented 3 years ago

To get a better feel for Kevin, a while back I went through the workflow of setting it up in a project. I realized at the time that our default getAssetName implementation didn't work — the user is forced to use a custom implementation.

That's because requests come into express as /path/to/file.js, but Kevin knows about assets as path/to/file. So we'd tell Kevin, "give me /path/to/file.js," and Kevin would say, "I don't know what that is."

I used this custom implementation to get things to work with a bare-bones setup.

I've just copied that implementation over here.

joebeachjoebeach commented 3 years ago

I was gonna go with patch version, tbh. It does change the default behavior, but the default behavior is a bug that is non-functional.