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
Feature request: middleware #13
Comments
This exists, though it hasn’t been added to the docs yet. Here’s the 2.0 canary serverless plugin using it: https://github.com/11ty/eleventy/blob/85b8a916245f0343dce9cda4ee268d41df2c6bf1/src/Plugins/ServerlessBundlerPlugin.js#L321 |
I'm going to try it today then!! 👍 |
Sorry I haven't had so much time to check.... but my own middleware gives
it may be on my side, but I have no trouble with browser-sync in Eleventy - old or new versions. |
Ahhhh, yeah I don’t think we support
That said I believe you can refactor it to use a function instead: function(req, res, next) {
if(!req.url.startsWith("/img")) {
next();
}
// do the thing
} |
You're right I could refactor... But I believe I'm the only one using my own middleware 😬 and as browser-sync went back to an ok status, I won't bother. |
I have been using - quite a lot - the
middleware
feature of browsersync.Despite being "minimal", could this new server propose the same feature?
Of course it's still possible to use browsersync.
The text was updated successfully, but these errors were encountered: