Travel Blog
-- Get inspired to experience the world. Our writers will give you their - first-hand stories and recommendations that will inspire, excite you, and - help you make the best decisions for planning your next adventure. -
-diff --git a/core-web/libs/sdk/bundle-budgets/budgets.json b/core-web/libs/sdk/bundle-budgets/budgets.json
index 5bafff3d333c..b6a9b752b5e3 100644
--- a/core-web/libs/sdk/bundle-budgets/budgets.json
+++ b/core-web/libs/sdk/bundle-budgets/budgets.json
@@ -3,5 +3,7 @@
"react-layout-only": 7500,
"react-hook-only": 5200,
"analytics-neutral": 25000,
+ "events-init": 30000,
+ "events-react": 2200,
"uve-only": 3700
}
diff --git a/core-web/libs/sdk/bundle-budgets/project.json b/core-web/libs/sdk/bundle-budgets/project.json
index f56014c34652..ca552fdbfc5f 100644
--- a/core-web/libs/sdk/bundle-budgets/project.json
+++ b/core-web/libs/sdk/bundle-budgets/project.json
@@ -12,7 +12,8 @@
"sdk-analytics",
"sdk-angular",
"sdk-vue",
- "sdk-experiments"
+ "sdk-experiments",
+ "sdk-events"
],
"targets": {
"test": {
diff --git a/core-web/libs/sdk/bundle-budgets/src/declared-deps.spec.ts b/core-web/libs/sdk/bundle-budgets/src/declared-deps.spec.ts
index af4194ad39a5..e003e4e048ed 100644
--- a/core-web/libs/sdk/bundle-budgets/src/declared-deps.spec.ts
+++ b/core-web/libs/sdk/bundle-budgets/src/declared-deps.spec.ts
@@ -34,7 +34,17 @@ import { SDK_DIST } from './bundle-probe.ts';
*/
/** Published libraries. Each must be built before this spec runs — see `implicitDependencies`. */
-const PACKAGES = ['react', 'client', 'uve', 'types', 'analytics', 'angular', 'vue', 'experiments'];
+const PACKAGES = [
+ 'react',
+ 'client',
+ 'uve',
+ 'types',
+ 'analytics',
+ 'angular',
+ 'vue',
+ 'experiments',
+ 'events'
+];
/** `from 'x'`, `import 'x'`, `import('x')` and `require('x')` — not bare strings that merely look like specifiers. */
const SPECIFIER = /(?:from|import|require)\s*\(?\s*['"](@dotcms\/[^'"]+)['"]/g;
diff --git a/core-web/libs/sdk/bundle-budgets/src/probes.ts b/core-web/libs/sdk/bundle-budgets/src/probes.ts
index 4f1083a038ba..f2e2b63e9397 100644
--- a/core-web/libs/sdk/bundle-budgets/src/probes.ts
+++ b/core-web/libs/sdk/bundle-budgets/src/probes.ts
@@ -42,6 +42,19 @@ export const PROBES: Probe[] = [
packages: ['analytics', 'uve', 'types'],
forbidden: ['/react/', 'next/navigation', 'useContentAnalytics', 'DotContentAnalytics']
},
+ {
+ name: 'events-init',
+ source: `import { dotEvents } from '@dotcms/events';\nexport { dotEvents };\n`,
+ packages: ['events', 'uve', 'types'],
+ forbidden: ['/react/', 'next/navigation', 'tinymce']
+ },
+ {
+ // The React adapter brings the markup and the boot script builder, never the engine
+ name: 'events-react',
+ source: `import { DotCMSExperiment } from '@dotcms/events/react';\nexport { DotCMSExperiment };\n`,
+ packages: ['events'],
+ forbidden: ['@dotcms/events/index', '/analytics/', '@analytics/']
+ },
{
name: 'uve-only',
source: `import { getUVEState } from '@dotcms/uve';\nexport { getUVEState };\n`,
diff --git a/core-web/libs/sdk/bundle-budgets/src/publint.spec.ts b/core-web/libs/sdk/bundle-budgets/src/publint.spec.ts
index 2564140bed05..a76caabc10ed 100644
--- a/core-web/libs/sdk/bundle-budgets/src/publint.spec.ts
+++ b/core-web/libs/sdk/bundle-budgets/src/publint.spec.ts
@@ -33,7 +33,7 @@ const ACCEPTED: Record
Loading the blog…
; +} diff --git a/examples/nextjs-experiments/src/app/blog/page.tsx b/examples/nextjs-experiments/src/app/blog/page.tsx index 0a99697dd6bc..45282b808972 100644 --- a/examples/nextjs-experiments/src/app/blog/page.tsx +++ b/examples/nextjs-experiments/src/app/blog/page.tsx @@ -1,14 +1,21 @@ import type { Metadata } from "next"; import { redirect } from "next/navigation"; +import { DotCMSExperiment } from "@dotcms/events/react"; + import NotFound from "@/app/not-found"; import { BlogListingPage } from "@/views/BlogListingPage"; import { ErrorPage } from "@/components/error"; import { getDotCMSPage } from "@/utils/getDotCMSPage"; import { getErrorStatus, getPageTitle, isPageError } from "@/utils/pageResponse"; -export async function generateMetadata(): Promise- Get inspired to experience the world. Our writers will give you their - first-hand stories and recommendations that will inspire, excite you, and - help you make the best decisions for planning your next adventure. -
-