You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We're currently applying Vite as server middleware on existing Slinkity projects. This works well for statically built pages, and seems to work well enough on serverless route resources as well. However, we noticed that requests to serverless urls skip all applied middleware in the latest 11ty v2 canary.
This is a problem for resources using Vite's special query params. For instance, a JS resource requested by the /about/ url may be represented like so: /about/?html-proxy&index=0.js. This is because Vite rewrites requests for special file extensions (ex. import './Component.jsx' -> /about/?html-proxy&index=Component.js) to intercept via server middleware. Ideally, middleware applied using setServerOptions would intercept this request before 11ty's serverless middleware to handle the request appropriately.
Describe the solution you'd like
Requests to serverless URLs should pass through custom middleware applied via eleventyConfig.setServerOptions.
Describe alternatives you've considered
N/A
Additional context
Applies to both 11ty 2.0 and 1.X browsersync middleware
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
We're currently applying Vite as server middleware on existing Slinkity projects. This works well for statically built pages, and seems to work well enough on serverless route resources as well. However, we noticed that requests to serverless urls skip all applied middleware in the latest 11ty v2 canary.
This is a problem for resources using Vite's special query params. For instance, a JS resource requested by the
/about/
url may be represented like so:/about/?html-proxy&index=0.js
. This is because Vite rewrites requests for special file extensions (ex.import './Component.jsx'
->/about/?html-proxy&index=Component.js
) to intercept via server middleware. Ideally, middleware applied usingsetServerOptions
would intercept this request before 11ty's serverless middleware to handle the request appropriately.Describe the solution you'd like
Requests to serverless URLs should pass through custom
middleware
applied viaeleventyConfig.setServerOptions
.Describe alternatives you've considered
N/A
Additional context
Applies to both 11ty 2.0 and 1.X browsersync middleware
The text was updated successfully, but these errors were encountered: