injectDevRoute allows you to inject a route in development only. For example:
injectDevRoute
1import {2 defineIntegration,3 createResolver,4 injectDevRoute5} from "astro-integration-kit";6 7export default defineIntegration({8 // ...9 setup() {10 const { resolve } = createResolver(import.meta.url);11 12 return {13 "astro:config:setup": (params) => {14 injectDevRoute(params, {15 pattern: "/foo",16 entrypoint: resolve("./pages/foo.astro")17 })18 }19 }20 }21})