Skip to main content

One post tagged with "Storybook"

View All Tags

Issues on Storybook 6.4 upgrading

· One min read

I recently upgraded the Storybook from v6.1.11 to v6.4.19 in my company's project, but the process is not smooth. I met the two issues on my upgrading.

Issues on Storybook 6.4 upgrading

Issue1: Missing class properties transform

Solution: add the below code to the ./storybook/main.js.

module.exports = {
babel: async (options) => ({
...options,
plugins: [['@babel/plugin-proposal-class-properties', { loose: true }]],
}),
}

Issue2: iframe.html no longer built with --preview-url

My storybook website runs in a subpath domain so should add --preview-url on the build command, but sadly find iframe.html no longer generated after upgrading.

The solved way is adding the option --force-build-preview to the build command.

References