Skip to content

Commit

Permalink
Fix storybook build for Razzle 4 (#3689)
Browse files Browse the repository at this point in the history
* Fix storybook build for Razzle 4

* Fix generator as well
  • Loading branch information
sneridagh committed Sep 28, 2022
1 parent ccd3d02 commit a1be70e
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,30 @@ const SVGLOADER = {
],
};

const defaultRazzleOptions = {
verbose: false,
debug: {},
buildType: 'iso',
cssPrefix: 'static/css',
jsPrefix: 'static/js',
enableSourceMaps: true,
enableReactRefresh: true,
enableTargetBabelrc: false,
enableBabelCache: true,
forceRuntimeEnvVars: [],
mediaPrefix: 'static/media',
staticCssInDev: false,
emitOnErrors: false,
disableWebpackbar: false,
browserslist: [
'>1%',
'last 4 versions',
'Firefox ESR',
'not ie 11',
'not dead',
],
};

module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
Expand All @@ -50,6 +74,10 @@ module.exports = {
plugins: razzleConfig.plugins,
},
webpack,
false,
undefined,
[],
defaultRazzleOptions,
);
const AddonConfigurationRegistry = require('../addon-registry');

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

### Internal

- Fix storybook build for Razzle 4 @sneridagh

### Documentation

## 16.0.0-alpha.38 (2022-09-27)
Expand Down
1 change: 1 addition & 0 deletions packages/generator-volto/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

- Add alias to ESlint config in project generator @sneridagh
- Add missing `moduleNameMapper`s to default app `package.json` jest config @sneridagh
- Fix storybook for Razzle 4 @sneridagh

### Internal

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,30 @@ const SVGLOADER = {
],
};

const defaultRazzleOptions = {
verbose: false,
debug: {},
buildType: 'iso',
cssPrefix: 'static/css',
jsPrefix: 'static/js',
enableSourceMaps: true,
enableReactRefresh: true,
enableTargetBabelrc: false,
enableBabelCache: true,
forceRuntimeEnvVars: [],
mediaPrefix: 'static/media',
staticCssInDev: false,
emitOnErrors: false,
disableWebpackbar: false,
browserslist: [
'>1%',
'last 4 versions',
'Firefox ESR',
'not ie 11',
'not dead',
],
};

module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
Expand All @@ -53,6 +77,10 @@ module.exports = {
plugins: razzleConfig.plugins,
},
webpack,
false,
undefined,
[],
defaultRazzleOptions,
);
const AddonConfigurationRegistry = require('@plone/volto/addon-registry');

Expand Down

0 comments on commit a1be70e

Please sign in to comment.