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 hooks: {14 "astro:config:setup": (params) => {15 injectDevRoute(params, {16 pattern: "/foo",17 entrypoint: resolve("./pages/foo.astro")18 })19 }20 }21 }22 }23})