Skip to content

Commit aefa8f5

Browse files
Version Packages (#2267)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 95cacbe commit aefa8f5

11 files changed

Lines changed: 76 additions & 77 deletions

File tree

.changeset/cute-doors-argue.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/funny-ravens-run.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

.changeset/shaky-toes-open.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/silly-owls-clean.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

examples/next/faustwp-getting-started/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"dependencies": {
1313
"@apollo/client": "^3.14.0",
1414
"@faustwp/cli": "^3.3.6",
15-
"@faustwp/core": "^3.3.6",
15+
"@faustwp/core": "^3.4.0",
1616
"@wordpress/base-styles": "^6.15.0",
1717
"@wordpress/block-library": "9.10.0",
1818
"classnames": "^2.5.1",

packages/faustwp-core/CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,58 @@
11
# @faustwp/core
22

3+
## 3.4.0
4+
5+
### Minor Changes
6+
7+
- ec26ac4: Feat: Added support `next/dynamic` imports for templates to reduce initial bundle size in a way that's backwards compatible with static imports.
8+
9+
This solves a known issue in Faust where all defined templates are bundled together and loaded on every WordPress page. By enabling the use of dynamic importing of templates this issue is resolved. Now templates are only loaded as needed per route.
10+
11+
It's recommended you migrate to dynamic imports by updating your template file. Here's an example:
12+
13+
```js title=src/wp-templates/index.js
14+
// Old Static Templates
15+
import category from './category';
16+
import tag from './tag';
17+
import frontPage from './front-page';
18+
import page from './page';
19+
import single from './single';
20+
21+
export default {
22+
category,
23+
tag,
24+
'front-page': frontPage,
25+
page,
26+
single,
27+
};
28+
29+
// New Dynamic Templates
30+
import dynamic from 'next/dynamic';
31+
32+
const category = dynamic(() => import('./category.js'));
33+
const tag = dynamic(() => import('./tag.js'));
34+
const frontPage = dynamic(() => import('./front-page.js'));
35+
const page = dynamic(() => import('./page.js'));
36+
37+
// The above examples assume use of default exports. If you are using named exports you'll need to handle that:
38+
const single = dynamic(() => import('./single.js').then(mod => mod.Single));
39+
40+
export default {
41+
category,
42+
tag,
43+
'front-page': frontPage,
44+
page,
45+
single,
46+
};
47+
```
48+
49+
For further info see the Next.js docs on the use of [`next/dynamic`](https://nextjs.org/docs/pages/guides/lazy-loading#nextdynamic-1).
50+
51+
### Patch Changes
52+
53+
- 91886b1: Upgraded fast-xml-parser from v5.3.4 to v5.3.6 to incorporate the latest bug fixes, performance improvements, and minor stability enhancements.
54+
- 95cacbe: Fixed an issue where dynamic template components were rendered via the next/dynamic wrapper directly, causing hydration mismatches and double renders, by resolving the dynamic component to its inner function and storing it in state before rendering.
55+
356
## 3.3.6
457

558
### Patch Changes

packages/faustwp-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@faustwp/core",
3-
"version": "3.3.6",
3+
"version": "3.4.0",
44
"description": "Faust is a framework that aims to make headless WordPress as streamlined as classic WordPress for both developers and publishers",
55
"main": "dist/cjs/index.js",
66
"module": "dist/mjs/index.js",

plugins/faustwp/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Faust
22

3+
## 1.8.6
4+
5+
### Patch Changes
6+
7+
- 56dfa51: - Updated `phpstan/phpstan` from 1.10.55 to 1.12.33
8+
- Updated `psy/psysh` from v0.12.7 to v0.12.19
9+
- Updated `phpunit/phpunit` from 9.6.22 to 9.6.33
10+
- Updated `symfony/process` from v6.4.15 to v6.4.33
11+
312
## 1.8.5
413

514
### Patch Changes

plugins/faustwp/faustwp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
1010
* Text Domain: faustwp
1111
* Domain Path: /languages
12-
* Version: 1.8.5
12+
* Version: 1.8.6
1313
* Requires PHP: 7.4
1414
* Requires at least: 5.7
1515
* Tested up to: 6.9

plugins/faustwp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"name": "@faustwp/wordpress-plugin",
3-
"version": "1.8.5",
3+
"version": "1.8.6",
44
"private": true
55
}

0 commit comments

Comments
 (0)