@prezly/theme-kit-nextjs 4.2.0-alpha.5 → 4.2.0

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.
Files changed (2) hide show
  1. package/README.md +6 -1
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -72,7 +72,7 @@ If you want to support multi-language in your theme, you'll need to make additio
72
72
 
73
73
  ```js
74
74
  const { DUMMY_DEFAULT_LOCALE } = require('@prezly/theme-kit-nextjs');
75
- const locales = require('@prezly/theme-kit-nextjs/core/intl/localeConfig');
75
+ const locales = require('@prezly/theme-kit-nextjs/core/localeConfig');
76
76
 
77
77
  module.exports = {
78
78
  /* ...your next config... */
@@ -311,6 +311,11 @@ These are available for `/category/[slug]`, `/story/[slug]` and `/media/album/[u
311
311
 
312
312
  You can find all of the helper methods in the [page-props](./tree/main/src/adapter-nextjs/page-props) directory.
313
313
 
314
+ ### Experimental: Next 13 /app directory
315
+
316
+ Currently, Next doesn't work well with tree-shaking during the code introspection phase, which will result in errors if you import anything from main export of `@prezly/theme-kit-nextjs` into a Next server component.
317
+ So far, the workaround for this (introduced in v4.2.0) is to import from the `server` subpath (`import ... from '@prezly/theme-kit-nextjs/server`). For client components and code that is not imported into server components, you can still use regular `@prezly/theme-kit-nextjs` imports.
318
+
314
319
  ----
315
320
 
316
321
  ## Contributing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/theme-kit-nextjs",
3
- "version": "4.2.0-alpha.5",
3
+ "version": "4.2.0",
4
4
  "description": "Data layer and utility library for developing Prezly themes with NextJS",
5
5
  "main": "build/esm/index.js",
6
6
  "types": "build/types/index.d.ts",
@@ -63,8 +63,8 @@
63
63
  "build:esm": "tsc --project tsconfig.esm.json",
64
64
  "build:cjs": "tsc --project tsconfig.cjs.json",
65
65
  "build": "npm run build:esm && npm run build:cjs",
66
- "dev": "tsc --watch --preserveWatchOutput --project .",
67
- "typecheck": "tsc --noEmit --incremental --project .",
66
+ "dev": "tsc --watch --preserveWatchOutput --project tsconfig.base.json",
67
+ "typecheck": "tsc --noEmit --incremental --project tsconfig.base.json",
68
68
  "lint": "eslint src",
69
69
  "test": "jest"
70
70
  },
@@ -80,7 +80,7 @@
80
80
  "next-seo": "^5.4.0"
81
81
  },
82
82
  "devDependencies": {
83
- "@prezly/theme-kit-core": "^4.2.0-alpha.2",
83
+ "@prezly/theme-kit-core": "^4.2.0",
84
84
  "@sentry/nextjs": "7.48.0",
85
85
  "rimraf": "3.0.2"
86
86
  },
@@ -88,5 +88,5 @@
88
88
  "access": "public"
89
89
  },
90
90
  "sideEffects": false,
91
- "gitHead": "d6d07c565c403894dbfbbd848ebd6600b4e6a080"
91
+ "gitHead": "6067bfdd7e108d88d9eb49c2fe04369e7411741e"
92
92
  }