[Bug]: Expected your framework's preset to export a renderToCanvas
field: After Migration to V8
#28762
Labels
renderToCanvas
field: After Migration to V8
#28762
Describe the bug
Hi there,
I have just upgraded my stencil.js repository, which uses storybook, from 7 to 8.
When I locally start storybook, I do not get any console errors. However the browser does not render any stories but give the error "Expected your framework's preset to export a
renderToCanvas
field.".The framework I am using is html-vite. Dependencies can be seen in system section.
main.ts in storybook folder
`import type { StorybookConfig } from '@storybook/html-vite';
import { mergeConfig } from 'vite';
import baseConfig from '../vite.config';
const config: StorybookConfig = {
stories: ['../src//*.mdx', '../src//.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-a11y',
{
name: '@storybook/addon-coverage',
options: {
istanbul: {
exclude: ['**/index.js', '**/loader.js'],
},
},
},
'storybook-addon-stencil',
'@storybook/addon-designs',
'storybook-addon-mock',
'storybook-addon-cookie',
'@storybook/addon-actions',
'@storybook/addon-docs',
'@storybook/addon-viewport',
],
staticDirs: [
{
from: '../assets',
to: '/assets',
},
],
framework: {
name: '@storybook/html-vite',
options: {},
},
async viteFinal(config) {
return mergeConfig(config, baseConfig);
},
};
export default config;`
vite.config.ts
`import autoprefixer from 'autoprefixer';
import path from 'path';
import { sourcemaps } from './.storybook/vite-plugin-sourcemaps';
const baseConfig = {
css: {
postcss: {
plugins: [autoprefixer],
},
},
resolve: {
alias: {
'@': path.resolve(__dirname, '../src'),
},
},
base: '',
sourcemaps: true,
plugins: [sourcemaps()],
};
export default baseConfig;`
manager.ts
`
import { addons } from '@storybook/manager-api';
addons.setConfig({
enableShortcuts: false,
});`
Is there any idea what the issue might be?
Reproduction link
/no-repro-possible
Reproduction steps
No response
System
Additional context
No response
The text was updated successfully, but these errors were encountered: