Precompile doesn't seem to work in the browserify-middleware currently available on npm. I can specify a console.log in the cachedCompile method to see that it does try to precompile, but when you hit the middleware with the exact path, it calls compile again. It seems like the only place where the cache key is being set is in the response handler so calling cachedCompile beforehand would never have any effect. I tested 6.0.0 and it seems to be working, so maybe this is a better & quicker fix?
It was released just over a month ago. You can install it using npm install browserify-middleware but make sure you update your package.json, and if you have any issues try deleting local caches.
Precompile doesn't seem to work in the browserify-middleware currently available on npm. I can specify a console.log in the cachedCompile method to see that it does try to precompile, but when you hit the middleware with the exact path, it calls compile again. It seems like the only place where the cache key is being set is in the response handler so calling cachedCompile beforehand would never have any effect. I tested 6.0.0 and it seems to be working, so maybe this is a better & quicker fix?