feat: scaffold Astro + Tailwind project
This commit is contained in:
13
node_modules/astro/dist/i18n/middleware.js
generated
vendored
Normal file
13
node_modules/astro/dist/i18n/middleware.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { getFetchStateFromAPIContext } from "../core/fetch/fetch-state.js";
|
||||
import { I18n } from "../core/i18n/handler.js";
|
||||
function createI18nMiddleware(i18n, base, trailingSlash, format) {
|
||||
if (!i18n) return (_, next) => next();
|
||||
const handler = new I18n(i18n, base, trailingSlash, format);
|
||||
return async (context, next) => {
|
||||
const response = await next();
|
||||
return handler.finalize(getFetchStateFromAPIContext(context), response);
|
||||
};
|
||||
}
|
||||
export {
|
||||
createI18nMiddleware
|
||||
};
|
||||
Reference in New Issue
Block a user