Skip to content

Commit a72db7c

Browse files
authored
Merge branch 'main' into mxdev_cache
2 parents dbd5880 + f1a7c13 commit a72db7c

File tree

7 files changed

+14
-2
lines changed

7 files changed

+14
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Rename last razzle import in Storybook config. @sneridagh

news/+morerazzlefixes.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed preset name in frontend scaffold to support the new razzle fork. @sneridagh
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Volto 19 has adopted `razzle-scss-plugin` in core. @sneridagh

news/309.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Babel preset in `.npmrc` compat for 19. @sneridagh

templates/add-ons/frontend/{{ cookiecutter.__folder_name }}/.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ public-hoist-pattern[]=*prettier*
33
public-hoist-pattern[]=*stylelint*
44
public-hoist-pattern[]=*cypress*
55
public-hoist-pattern[]=babel-plugin-react-intl
6-
public-hoist-pattern[]=babel-preset-razzle
6+
public-hoist-pattern[]=*babel-preset-razzle

templates/add-ons/frontend/{{ cookiecutter.__folder_name }}/.storybook/main.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ const path = require('path');
55
const projectRootPath = path.resolve('.');
66
const lessPlugin = require('@plone/volto/webpack-plugins/webpack-less-plugin');
77
const RelativeResolverPlugin = require('@plone/volto/webpack-plugins/webpack-relative-resolver');
8+
{%- if cookiecutter.volto_version >= '19' %}
9+
const scssPlugin = require('@plone/volto/webpack-plugins/webpack-scss-plugin');
10+
const createConfig = require('@plone/razzle/config/createConfigAsync.js');
11+
{%- else %}
812
const scssPlugin = require('razzle-plugin-scss');
9-
1013
const createConfig = require('razzle/config/createConfigAsync.js');
14+
{%- endif %}
1115
const razzleConfig = require(path.join(projectRootPath, 'razzle.config.js'));
1216

1317
const SVGLOADER = {

templates/add-ons/frontend/{{ cookiecutter.__folder_name }}/packages/{{ cookiecutter.frontend_addon_name }}/babel.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
module.exports = function (api) {
22
api.cache(true);
3+
{%- if cookiecutter.volto_version >= '19' %}
4+
const presets = ['@plone/razzle'];
5+
{%- else %}
36
const presets = ['razzle'];
7+
{%- endif %}
48
const plugins = [
59
[
610
'react-intl', // React Intl extractor, required for the whole i18n infrastructure to work

0 commit comments

Comments
 (0)