Hello,
I am a newcomer to Plone/Volto and am building a small website for a local German village association.
I am currently trying to customize the Volto Teaser block. I used ChatGPT as assistance while setting this up. The approach we chose was to create a project-specific add-on and use that add-on as the site's theme.
According to the Volto documentation, using the project's default add-on as the theme is a valid approach for a single-project site.
My environment is:
Plone backend: 6.x
Volto: 19.3.0
pnpm: 10.20.0
Docker
Windows + WSL2
The frontend is mounted into the Docker container as /app.
The relevant structure is:
frontend/
├── package.json
├── pnpm-workspace.yaml
├── volto.config.js
└── packages/
├── volto-gemlegr/
│ ├── package.json
│ └── src/
│ └── theme/
│ ├── theme.config
│ └── theme.js
└── wj-volto/
The active Volto configuration is:
const addons = ['volto-gemlegr'];
const theme = 'volto-gemlegr';
module.exports = {
addons,
theme,
};
volto-gemlegr/package.json is:
{
"name": "volto-gemlegr",
"version": "1.0.0",
"main": "src/index.js"
}
There is also an experimental package called wj-volto. It is not intended to be the active add-on or theme. Its package name is now:
{
"name": "wj-volto",
"version": "1.0.0",
"main": "src/index.js"
}
I tried to isolate the problem by removing wj-volto from the workspace:
- "packages/volto-gemlegr"
instead of:
- "packages/*"
I then ran:
pnpm install
which completed successfully.
I also removed the Volto and Node build caches:
rm -rf /app/core/packages/volto/cache
rm -rf /app/node_modules/.cache
However, pnpm build still fails with the following:
@import (multiple) '../../theme.config';
Less resolver error:
'../../theme.config' wasn't found.
Webpack resolver error details:
resolve '../../theme.config'
in '/app/node_modules/.pnpm/semantic-ui-less@2.4.1/node_modules/semantic-ui-less/definitions/modules'
aliased with mapping '../../theme.config':
'/app/packages/wj-volto/src/theme/theme.config'
to '/app/packages/wj-volto/src/theme/theme.config'
It then reports:
/app/packages/wj-volto/src/theme/theme.config doesn't exist
The important point is that volto-gemlegr/src/theme/theme.config does exist, while wj-volto/src/theme/theme.config does not.
I also searched the project for the literal path:
/app/packages/wj-volto/src/theme/theme.config
and found no configuration file containing it.
So my question is:
Why is Volto/Webpack resolving the theme.config alias to wj-volto when volto.config.js explicitly specifies volto-gemlegr as the active theme, and wj-volto is no longer part of the workspace?
Could I be missing another Volto 19 theme configuration step, or could this be a problem in the theme-resolution/build configuration?
As I am new to Volto, I would particularly appreciate seeing the minimal correct setup for a project-specific theme in Volto 19.
This forum question was also created with the help of ChatGPT.
Thanks for any help.