@kidecms/core 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/integration.js +5 -1
- package/package.json +1 -1
package/dist/integration.js
CHANGED
|
@@ -175,7 +175,11 @@ export default function cmsIntegration(options) {
|
|
|
175
175
|
pattern: "/api/cms/locks/[...path]",
|
|
176
176
|
entrypoint: "@kidecms/core/routes/api/cms/locks/[...path].ts",
|
|
177
177
|
});
|
|
178
|
-
|
|
178
|
+
// Preview render route uses Astro Container API which depends on Vite internals.
|
|
179
|
+
// Only inject in dev mode — production builds (especially Cloudflare Workers) can't bundle it.
|
|
180
|
+
if (command === "dev") {
|
|
181
|
+
injectRoute({ pattern: "/api/cms/preview/render", entrypoint: "@kidecms/core/routes/api/cms/preview/render.ts" });
|
|
182
|
+
}
|
|
179
183
|
injectRoute({
|
|
180
184
|
pattern: "/api/cms/references/[collection]/[id]",
|
|
181
185
|
entrypoint: "@kidecms/core/routes/api/cms/references/[collection]/[id].ts",
|