Skip to content
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
388dc7c
Add package @volto/razzle
wesleybl Oct 22, 2025
0e366fd
Fix prettier and eslint
wesleybl Oct 23, 2025
576b847
Add release-it with towncrier
wesleybl Oct 23, 2025
5d3b767
Fix links in README.md
wesleybl Oct 23, 2025
6e7179c
Remove links that don't work
wesleybl Oct 23, 2025
7254227
Fix npm version badge in README.md
wesleybl Oct 23, 2025
dc9af96
Add newline for better readability in README.md
wesleybl Oct 23, 2025
7fc377f
Change
wesleybl Oct 23, 2025
52bc1a7
Add upgrade note
wesleybl Oct 23, 2025
5eaa043
typo
wesleybl Oct 23, 2025
3f2c0bc
Code review
wesleybl Oct 23, 2025
c521c27
Update README.md to include context for Razzle fork
wesleybl Oct 29, 2025
0ab9358
Remove note about changing `razzle` to `@volto/razzle` in package.json.
wesleybl Oct 29, 2025
0e466ed
Code review
wesleybl Oct 29, 2025
af9b3e5
Fix links rendirects in README.md
wesleybl Oct 29, 2025
d19bd1a
Fix links rendirects in README.md
wesleybl Oct 29, 2025
6c1aadd
Code review
wesleybl Oct 29, 2025
abe0f13
Update RR7 docs link in README
stevepiercy Oct 29, 2025
2626580
Remove the installation step for the @volto/razzle dependency
wesleybl Nov 3, 2025
39c904c
Merge branch 'main' into volto-razzle
wesleybl Nov 3, 2025
6144c1e
Update pnpm-lock.yaml
wesleybl Nov 3, 2025
0f5b631
Code review
wesleybl Nov 4, 2025
c6d2b80
Add mini-css-extract-plugin@2.7.2 as peerDependencie
wesleybl Nov 5, 2025
3cfe9b8
Remove mini-css-extract-plugin from peerDependencies
wesleybl Nov 5, 2025
4873f2f
Merge branch 'main' into volto-razzle
wesleybl Nov 13, 2025
b44e791
Add mini-css-extract-plugin@2.7.2 as peerDependencie
wesleybl Nov 13, 2025
090b785
Merge branch 'main' into volto-razzle
sneridagh Nov 14, 2025
72e3a01
Update docs/source/upgrade-guide/index.md
sneridagh Nov 16, 2025
c2f528d
Update docs/source/upgrade-guide/index.md
wesleybl Nov 17, 2025
b5d9295
Update docs/source/upgrade-guide/index.md
wesleybl Nov 17, 2025
b5d3fec
Merge branch 'main' into volto-razzle
sneridagh Nov 19, 2025
5f56632
Rename package to @plone/razzle
sneridagh Nov 19, 2025
13e5a47
Fork `babel-razzle-preset` into `@plone/babel-razzle-preset` (#7619)
sneridagh Nov 19, 2025
81f24c2
Remove Jest (#7624)
Abhishek-17h Nov 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/rr7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ make backend-docker-start

## About this app

- [Remix Docs](https://remix.run/docs/en/main)
- [Remix Docs](https://reactrouter.com/start/framework/installation)
32 changes: 32 additions & 0 deletions docs/source/upgrade-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,38 @@ You should take the following actions for your Volto 19 projects.

If you can't upgrade immediately, you may continue to run Volto 19 on Node.js 20 at your own risk, but be aware that issues specific to Node.js 20 will not be fixed in the Volto core CI or releases.

(replace-razzle-with-volto-razzle)=

### Replace `razzle` with `@volto/razzle` (fork)
```{versionchanged} Volto 19.0.0-alpha.14
```

`@volto/razzle` is a fork of the upstream `razzle` package that contains Volto-specific fixes and patches.
Use `@volto/razzle` in your Volto 19 projects when either you need the Volto-compatible build behavior, or the Volto team provides temporary patches that are not yet merged upstream in Razzle.

For most projects, no action is required.
The fork maintains full compatibility with the original `razzle` package, preserving all CLI entry points such as `razzle start`, `razzle build`, and `razzle test`.

However, if you have customized Volto's internals in your project—for example, by importing internal modules directly from the `razzle` package such as `require('razzle/some/path')`—then you need to update those imports to reference `@volto/razzle` instead.

To verify whether your project requires updates, search for any direct references to internal `razzle` modules:

```shell
grep -R "require.*razzle/" -n --exclude-dir=node_modules || true
grep -R "from.*razzle/" -n --exclude-dir=node_modules || true
```

If you find any matches, check in particular:

- build and Babel configurations, including {file}`babel.config.js`, {file}`.babelrc`, {file}`webpack.config.js`, and {file}`razzle.config.js`
- any presets or plugins sections that import internal `razzle` modules
- custom build scripts that reference `razzle` internals

```{note}
The fork exists so we can ship fixes and compatibility patches required by Volto, since the upstream is no longer maintained.
Our goal is to keep `@volto/razzle` compatible with the `razzle` public API.
```

### `pnpm` has been upgraded to version 10
```{versionchanged} Volto 19.0.0-alpha.7
```
Expand Down
29 changes: 29 additions & 0 deletions packages/volto-razzle/.release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"plugins": {
"../scripts/prepublish.js": {}
},
"hooks": {
"after:bump": [
"pipx run towncrier build --draft --yes --version ${version} > .changelog.draft",
"pipx run towncrier build --yes --version ${version}"
],
"after:release": "rm .changelog.draft"
},
"npm": {
"publish": false
},
"git": {
"commitArgs": ["--no-verify"],
"changelog": "pipx run towncrier build --draft --yes --version 0.0.0",
"requireUpstream": false,
"requireCleanWorkingDir": false,
"commitMessage": "Release @volto/razzle ${version}",
"tagName": "plone-slate-${version}",
"tagAnnotation": "Release @volto/razzle ${version}"
},
"github": {
"release": true,
"releaseName": "@volto/razzle ${version}",
"releaseNotes": "cat .changelog.draft"
}
}
9 changes: 9 additions & 0 deletions packages/volto-razzle/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# @volto/razzle Release Notes

<!-- Do *NOT* add new change log entries to this file.
Instead create a file in the news directory.
For helpful instructions, see:
https://6.docs.plone.org/contributing/index.html#change-log-entry
-->

<!-- towncrier release notes start -->
74 changes: 74 additions & 0 deletions packages/volto-razzle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
> [!IMPORTANT]
> This package is a maintained fork of the original [Razzle](https://github.com/jaredpalmer/razzle).
> The upstream project is currently unmaintained, so we forked it into the Volto monorepo to keep its dependencies updated and address security issues.
> All upstream attributions are preserved below.

![repo-banner](https://user-images.githubusercontent.com/4060187/28923990-050a32d4-782e-11e7-9da7-574ce5a8b455.png)

[![npm version](https://img.shields.io/npm/v/@volto/razzle.svg)](https://www.npmjs.com/package/@volto/razzle) [![npm](https://img.shields.io/npm/dm/@volto/razzle)](https://www.npmjs.com/package/@volto/razzle)

Universal JavaScript applications are tough to setup. Either you buy into a framework like Next.js or Nuxt, fork a boilerplate, or set things up yourself. Aiming to fill this void, Razzle is a tool that abstracts all the complex configuration needed for building SPA's and SSR applications into a single dependency--giving you the awesome developer experience of [create-react-app](https://github.com/facebook/create-react-app), but then leaving the rest of your app's architectural decisions about frameworks, routing, and data fetching up to you. With this approach, Razzle not only works with React, but also Preact, Vue, Svelte, and Angular, and most importantly......whatever comes next.

## Getting Started

Visit <a aria-label="razzle getting started" href="https://razzlejs.org/getting-started">https://razzlejs.org/getting-started</a> to get started with Razzle.

## Examples

Razzle has many examples, we might have one that fits your needs

See: [The examples](https://github.com/jaredpalmer/razzle/tree/master/examples)

## Documentation

Visit <a aria-label="razzle docs" href="https://razzlejs.org/">https://razzlejs.org/</a> to view the documentation.

## Contributing

Please see our [CONTRIBUTING.md](../../CONTRIBUTING.md).

## Inspiration

- [jaredpalmer/backpack](https://github.com/jaredpalmer/backpack)
- [nytimes/kyt](https://github.com/nytimes/kyt)
- [facebookincubator/create-react-app](https://github.com/facebook/create-react-app)
- [ndreckshage/sambell](https://github.com/ndreckshage/sambell)
- [vercel/next.js](https://github.com/vercel/next.js)

### Author

- [Jared Palmer](https://twitter.com/jaredpalmer)

## Contributors

Thanks goes to these wonderful people ([emoji key](https://github.com/all-contributors/all-contributors.github.io#emoji-key)):

<!-- START contributors generated instructions please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN yarn build-docs TO UPDATE -->
- **Jared Palmer** - [@jaredpalmer](https://jaredpalmer.com)
- **Contributions:** question, code, design, doc, example, ideas, review, test, tool
- **Nima Arefi** - [@Nimaa77](https://github.com/Nimaa77)
- **Contributions:** question, code, doc, example, ideas, review, test, tool
- **Øyvind Saltvik** - [@fivethreeo](https://github.com/fivethreeo/)
- **Contributions:** question, code, example, ideas, review, test, tool
- **Jari Zwarts** - [@jariz](https://jari.io)
- **Contributions:** question, code, ideas, plugin, review
- **Dan Abramov** - [@gaearon](http://twitter.com/dan_abramov)
- **Contributions:** code, ideas
- **Eric Clemmons**
- **Contributions:** code, ideas
- **Zino Hofmann** - [@HofmannZ](https://www.linkedin.com/in/zinohofmann/)
- **Contributions:** example
- **Lucas Terra** - [@lucasterra](https://www.linkedin.com/in/lucasterra7/)
- **Contributions:** code, example, plugin
- **Ray Andrew**
- **Contributions:** code, example, plugin
- **Heithem Moumni** - [@heithemmoumni](https://www.linkedin.com/in/heithemmoumni/)
- **Contributions:** code, example, plugin
<!-- END contributors generated instructions please keep comment here to allow auto update -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors.github.io) specification. Contributions of any kind welcome!

---

MIT License
1 change: 1 addition & 0 deletions packages/volto-razzle/babel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('babel-preset-razzle');
81 changes: 81 additions & 0 deletions packages/volto-razzle/bin/razzle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#!/usr/bin/env node
'use strict';

const sade = require('sade');
const spawn = require('react-dev-utils/crossSpawn');
const pkg = require('../package.json');
const prog = sade('razzle');
prog.version(pkg.version);

const argv = process.argv.slice(3);

prog
.command('build')
.describe('Build the application')
.option(
'-t, --type',
'Change the application build type. Must be either `iso` or `spa`.',
'iso',
)
.action(() => {
runCommand('build', [], argv);
});

prog
.command('start')
.describe('Start the application in development mode.')
.option(
'-t, --type',
'Change the application build type. Must be either `iso` or `spa`.',
'iso',
)
.action(() => {
runCommand('start', [], argv);
});

prog
.command('export')
.describe('Export a static version of the application in production mode.')
.action(() => {
runCommand('export', [], argv);
});

prog
.command('test')
.describe('Runs the test watcher in an interactive mode.')
.action(() => {
runCommand(
'test',
argv.filter((x) => x.includes('--inspect')),
argv.filter((x) => !x.includes('--inspect')),
);
});

function runCommand(script, node_args, script_args) {
const result = spawn.sync(
'node',
node_args
.concat([require.resolve('../scripts/' + script)])
.concat(script_args),
{ stdio: 'inherit' },
);
if (result.signal) {
if (result.signal === 'SIGKILL') {
console.log(
'The build failed because the process exited too early. ' +
'This probably means the system ran out of memory or someone called ' +
'`kill -9` on the process.',
);
} else if (result.signal === 'SIGTERM') {
console.log(
'The build failed because the process exited too early. ' +
'Someone might have called `kill` or `killall`, or the system could ' +
'be shutting down.',
);
}
process.exit(1);
}
process.exit(result.status);
}

prog.parse(process.argv);
Loading