Skip to content

Commit

Permalink
Fix the boilerplate for old generator and add a missing upgrade guide… (
Browse files Browse the repository at this point in the history
#6368)

Co-authored-by: Fred van Dijk <[email protected]>
Co-authored-by: Steve Piercy <[email protected]>
Co-authored-by: David Glick <[email protected]>
  • Loading branch information
4 people authored Oct 4, 2024
1 parent 29a8b55 commit 30ce8a7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/source/upgrade-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,35 @@ The recommended way of generating a project boilerplate is [Cookieplone](https:/
Please update your code to use the `pnpm` based setup.
```

### Update needed to project boilerplate generated with `@plone/generator-volto`

```{versionadded} Volto 18.0.0-alpha.42
Effective with Volto 18.0.0-alpha.42, a new feature introduced a breaking change in the boilerplates created using `@plone/generator-volto` 9.0.0-alpha.17 and earlier.
```

You need to change your {file}`razzle.config.js` file in the root of your boilerplate.

```diff
razzle.config.js
@@ -27,12 +27,14 @@ const customModifyWebpackConfig = ({
webpackConfig,
webpackObject,
options,
+ paths,
}) => {
const config = modifyWebpackConfig({
env: { target, dev },
webpackConfig,
webpackObject,
options,
+ paths,
});
// add custom code here..
return config;
```

The change involves adding a new `paths` argument to the `customModifyWebpackConfig` function.

(volto-upgrade-guide-17.x.x)=

## Upgrading to Volto 17.x.x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ const customModifyWebpackConfig = ({
webpackConfig,
webpackObject,
options,
paths,
}) => {
const config = modifyWebpackConfig({
env: { target, dev },
webpackConfig,
webpackObject,
options,
paths,
});
// add custom code here..
return config;
Expand Down
1 change: 1 addition & 0 deletions packages/generator-volto/news/6368.breaking
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated `razzle.config.js` to accommodate new argument `paths` passed down to `customModifyWebpackConfig`. @sneridagh

0 comments on commit 30ce8a7

Please sign in to comment.