Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
f741536
fix(a11y): add aria-selected attribute to tab buttons
Nischit-Ekbote Oct 7, 2025
74c6c63
Merge pull request #1 from Nischit-Ekbote/fix/tabs-aria-selected
Nischit-Ekbote Oct 7, 2025
67d5780
generate code snippets from csf file
kasperpeulen Oct 9, 2025
9227a04
Merge branch 'next' into next
Sidnioulz Oct 10, 2025
5efe183
Lot more cases
kasperpeulen Oct 10, 2025
446abe5
Cleanup code
kasperpeulen Oct 10, 2025
ef96eff
Inline args in JSX
kasperpeulen Oct 10, 2025
2d86537
More test examples
kasperpeulen Oct 10, 2025
3738a60
Add extra tests
kasperpeulen Oct 10, 2025
2442574
Fix type error
kasperpeulen Oct 10, 2025
18aaaf4
Template.bind expressions
kasperpeulen Oct 10, 2025
9cec261
Merge branch 'next' into next
Sidnioulz Oct 13, 2025
50ea146
Add componentManifestGenerator preset and implement for react
kasperpeulen Oct 15, 2025
addd229
Merge remote-tracking branch 'origin/10.1' into kasper/code-snippets
kasperpeulen Oct 15, 2025
4ed3856
Fix types
kasperpeulen Oct 15, 2025
a449847
Update code/core/src/core-server/dev-server.ts
kasperpeulen Oct 16, 2025
4ce972a
Update code/core/src/core-server/dev-server.ts
kasperpeulen Oct 16, 2025
1599fac
Update code/core/src/core-server/build-static.ts
kasperpeulen Oct 16, 2025
1bcd00b
Update code/core/src/core-server/build-static.ts
kasperpeulen Oct 16, 2025
bf9a49a
Improve dev server logic
kasperpeulen Oct 16, 2025
f2e3ddb
Merge remote-tracking branch 'origin/kasper/code-snippets' into kaspe…
kasperpeulen Oct 16, 2025
c0df22c
Add type
kasperpeulen Oct 16, 2025
25b197e
Fix lint
kasperpeulen Oct 16, 2025
18c671e
Use node logger
kasperpeulen Oct 16, 2025
11ac914
Fix
kasperpeulen Oct 16, 2025
98f121b
Add component name and tests
kasperpeulen Oct 16, 2025
bd91ab6
Fix typos
kasperpeulen Oct 16, 2025
d3f1940
Merge branch 'kasper/code-snippets' into kasper/manifest-component-name
kasperpeulen Oct 16, 2025
b865df9
Add component description to manifest
kasperpeulen Oct 16, 2025
51cdfc7
Extract jsdoc tags
kasperpeulen Oct 16, 2025
04cdc63
Make begin with props
kasperpeulen Oct 16, 2025
1e84547
Remove redundant features fetch
kasperpeulen Oct 16, 2025
a6f6673
Apply feedback
kasperpeulen Oct 16, 2025
fd80c9d
Implement last feedback
kasperpeulen Oct 17, 2025
e2213c8
Restructure
kasperpeulen Oct 17, 2025
55c37e5
Merge branch 'kasper/code-snippets' into kasper/props
kasperpeulen Oct 17, 2025
c7a1572
Fix type
kasperpeulen Oct 17, 2025
46c5a6a
Fix name
kasperpeulen Oct 17, 2025
d9f9a3b
Fix check
kasperpeulen Oct 17, 2025
0b83e62
Add export named handler and add tests for react-docgen
kasperpeulen Oct 17, 2025
146a644
Fix
kasperpeulen Oct 17, 2025
1e6dc13
Improve types
kasperpeulen Oct 17, 2025
8224f40
Fix filename
kasperpeulen Oct 17, 2025
0ed2b8c
Simplify memfs mock
kasperpeulen Oct 17, 2025
22d12cc
Fix snapshot
kasperpeulen Oct 17, 2025
9b18ad0
Fix format, use version number
kasperpeulen Oct 17, 2025
f9dd32e
Fix regex
kasperpeulen Oct 17, 2025
f6b154f
Fix type
kasperpeulen Oct 17, 2025
36854cb
Fix lint
kasperpeulen Oct 17, 2025
f926862
Add error handling for build
kasperpeulen Oct 17, 2025
ca19b25
Typo
kasperpeulen Oct 17, 2025
455fe3f
Fix children
kasperpeulen Oct 17, 2025
d1c6324
Fix unit tests
kasperpeulen Oct 17, 2025
b924a0c
A11y: Add aria-selected attribute to tab buttons (#32656)
Sidnioulz Oct 20, 2025
c5311ef
Update code/renderers/react/src/componentManifest/generator.ts
kasperpeulen Oct 20, 2025
80ea6a6
Fix unit tests
kasperpeulen Oct 20, 2025
3825193
Add comment
kasperpeulen Oct 20, 2025
e4f7a57
Enable in UI
kasperpeulen Oct 20, 2025
917db04
Adress review
kasperpeulen Oct 20, 2025
6b39ffd
Trim the description
kasperpeulen Oct 20, 2025
46a5714
Better error handling
kasperpeulen Oct 20, 2025
4dfd30b
Address feedback
kasperpeulen Oct 22, 2025
1181213
Filter out when we can not find a component name
kasperpeulen Oct 22, 2025
0fd167e
Add a todo
kasperpeulen Oct 22, 2025
99ff2b8
Make react-docgen dev dep
kasperpeulen Oct 22, 2025
91d3927
Merge remote-tracking branch 'origin/10.1' into kasper/props
kasperpeulen Oct 22, 2025
ad233cb
Fix null and undefined values
kasperpeulen Oct 22, 2025
d903424
Implement new AST based code examples
kasperpeulen Oct 22, 2025
fa08b04
Apply suggestion from @coderabbitai[bot]
kasperpeulen Oct 22, 2025
787206f
Fix examples
kasperpeulen Oct 22, 2025
191d426
Merge branch 'next' of github.com:storybookjs/storybook into 10.1
JReinhold Oct 23, 2025
39c7a71
Merge branch '10.1' into kasper/props
JReinhold Oct 23, 2025
b739c26
Merge pull request #32751 from storybookjs/kasper/props
JReinhold Oct 23, 2025
af0645c
Merge branch 'next' into 10.1-with-canary-release
JReinhold Oct 23, 2025
e474ea9
Improve testing and improve jsdoc tag description
kasperpeulen Oct 23, 2025
c165fc5
Merge remote-tracking branch 'origin/kasper/source-code' into kasper/…
kasperpeulen Oct 23, 2025
28f59f5
add experimental_devServer preset
JReinhold Oct 23, 2025
ddff493
Adress code review
kasperpeulen Oct 24, 2025
308889e
Merge branch '10.1-with-canary-release' into kasper/source-code
kasperpeulen Oct 24, 2025
7b5dadc
Adress code review
kasperpeulen Oct 24, 2025
7d970f5
Fix tests
kasperpeulen Oct 24, 2025
d53734f
Fix lint
kasperpeulen Oct 24, 2025
6867ca5
Merge remote-tracking branch 'origin/next' into 10.1-with-canary-release
kasperpeulen Oct 24, 2025
13a2dbe
Merge remote-tracking branch 'origin/10.1-with-canary-release' into k…
kasperpeulen Oct 24, 2025
e0eeba2
Merge branch '10.1-with-canary-release' into jeppe/devserver-preset
yannbf Oct 24, 2025
e616765
Merge pull request #32816 from storybookjs/jeppe/devserver-preset
JReinhold Oct 26, 2025
6e759c7
Merge branch 'next' into 10.1-with-canary-release
JReinhold Oct 27, 2025
46d43a6
Merge branch '10.1-with-canary-release' into kasper/source-code
kasperpeulen Oct 27, 2025
fdcb204
Fix tests
kasperpeulen Oct 27, 2025
7d3aa5d
Fix portable stories test
kasperpeulen Oct 27, 2025
a496f56
Fix portable stories test
kasperpeulen Oct 27, 2025
8422167
Be safe
kasperpeulen Oct 27, 2025
26d8df6
Merge pull request #32813 from storybookjs/kasper/source-code
kasperpeulen Oct 27, 2025
40c0476
Improve error handling of component manifest generation
kasperpeulen Oct 27, 2025
4626b94
Refactor
kasperpeulen Oct 28, 2025
0c1d131
Handle top level function exports
kasperpeulen Oct 28, 2025
9a0e557
Improve CSF1 parsing a lot
kasperpeulen Oct 28, 2025
c6bbabd
Add fragment support
kasperpeulen Oct 28, 2025
a5fc2b3
Don't require component path anymore
kasperpeulen Oct 28, 2025
350cba2
Always include examples
kasperpeulen Oct 28, 2025
d265a56
Merge branch 'next' into 10.1-with-canary-release
ndelangen Oct 28, 2025
b9ae4f7
Cleanup code and fix tests
kasperpeulen Oct 29, 2025
556e266
Cleanup code and fix tests
kasperpeulen Oct 29, 2025
0c76373
Fix prettier
kasperpeulen Oct 29, 2025
b181565
Fallback to index title when no component name defined
kasperpeulen Oct 29, 2025
8e4219c
Adress review
kasperpeulen Oct 29, 2025
97c90e8
Adress review
kasperpeulen Oct 29, 2025
84a35c7
Better error message
kasperpeulen Oct 29, 2025
74728f2
Fix meta.story()
kasperpeulen Oct 29, 2025
ed875e3
Merge branch 'next' into 10.1-with-canary-release
JReinhold Oct 30, 2025
b390162
Merge pull request #32855 from storybookjs/kasper/error-manifest
kasperpeulen Oct 30, 2025
caef1f2
Merge branch 'next' into 10.1-with-canary-release
JReinhold Oct 30, 2025
f2a10d3
Merge pull request #32810 from storybookjs/10.1-with-canary-release
JReinhold Oct 30, 2025
9e419ea
Write changelog for 10.1.0-alpha.2 [skip ci]
storybook-bot Oct 30, 2025
cbc00d5
manually add changelog entries
JReinhold Oct 31, 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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@ code/core/report
node_modules/.svelte2tsx-language-server-files

*storybook.log

.junie
7 changes: 7 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 10.1.0-alpha.2

- A11y: Add aria-selected attribute to tab buttons - [#32656](https://github.com/storybookjs/storybook/pull/32656), thanks @Nischit-Ekbote!
- React: Experimental code examples - [#32813](https://github.com/storybookjs/storybook/pull/32813), thanks @kasperpeulen!
- React: Implement manifests/component.json for React - [#32751](https://github.com/storybookjs/storybook/pull/32751), thanks @kasperpeulen!
- React: Improve error handling of component manifest generation - [#32855](https://github.com/storybookjs/storybook/pull/32855), thanks @kasperpeulen!

## 10.1.0-alpha.1

- CLI: Fix glob string formatting in csf-factories codemod - [#32880](https://github.com/storybookjs/storybook/pull/32880), thanks @yannbf!
Expand Down
2 changes: 2 additions & 0 deletions code/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ const config = defineMain({
features: {
developmentModeForBuild: true,
experimentalTestSyntax: true,
experimentalComponentsManifest: true,
experimentalCodeExamples: true,
},
staticDirs: [{ from: './bench/bundle-analyzer', to: '/bundle-analyzer' }],
viteFinal: async (viteConfig, { configType }) => {
Expand Down
10 changes: 9 additions & 1 deletion code/addons/docs/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { fileURLToPath } from 'node:url';

import { logger } from 'storybook/internal/node-logger';
import type { Options, PresetProperty, StorybookConfigRaw } from 'storybook/internal/types';
import { type CsfEnricher } from 'storybook/internal/types';

import type { CsfPluginOptions } from '@storybook/csf-plugin';

Expand Down Expand Up @@ -41,6 +42,8 @@ async function webpack(

const { csfPluginOptions = {}, mdxPluginOptions = {} } = options;

const enrichCsf = await options.presets.apply('experimental_enrichCsf');

const rehypeSlug = (await import('rehype-slug')).default;
const rehypeExternalLinks = (await import('rehype-external-links')).default;

Expand Down Expand Up @@ -100,7 +103,12 @@ async function webpack(
...(webpackConfig.plugins || []),

...(csfPluginOptions
? [(await import('@storybook/csf-plugin')).webpack(csfPluginOptions)]
? [
(await import('@storybook/csf-plugin')).webpack({
...csfPluginOptions,
enrichCsf,
}),
]
: []),
],
resolve: {
Expand Down
7 changes: 6 additions & 1 deletion code/builders/builder-vite/src/plugins/csf-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ export async function csfPlugin(config: Options): Promise<Plugin> {
// @ts-expect-error - not sure what type to use here
addons.find((a) => [a, a.name].includes('@storybook/addon-docs'))?.options ?? {};

const enrichCsf = await presets.apply('experimental_enrichCsf');

// TODO: looks like unplugin can return an array of plugins
return vite(docsOptions?.csfPluginOptions) as Plugin;
return vite({
...docsOptions?.csfPluginOptions,
enrichCsf,
}) as Plugin;
}
4 changes: 2 additions & 2 deletions code/core/src/common/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { getInterpretedFile } from './utils/interpret-files';
import { stripAbsNodeModulesPath } from './utils/strip-abs-node-modules-path';
import { validateConfigurationFiles } from './utils/validate-configuration-files';

type InterPresetOptions = Omit<
export type InterPresetOptions = Omit<
CLIOptions &
LoadOptions &
BuilderOptions & { isCritical?: boolean; build?: StorybookConfigRaw['build'] },
Expand Down Expand Up @@ -321,7 +321,7 @@ export async function getPresets(
const loadedPresets: LoadedPreset[] = await loadPresets(presets, 0, storybookOptions);

return {
apply: async (extension: string, config: any, args = {}) =>
apply: async (extension: string, config?: any, args = {}) =>
applyPresets(loadedPresets, extension, config, args, storybookOptions),
};
}
Expand Down
2 changes: 1 addition & 1 deletion code/core/src/common/utils/formatter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
async function getPrettier() {
export async function getPrettier() {
return import('prettier').catch((e) => ({
resolveConfig: async () => null,
format: (content: string) => content,
Expand Down
1 change: 1 addition & 0 deletions code/core/src/components/components/tabs/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ export const Tabs: FC<TabsProps> = memo(
actions.onSelect(id);
}}
role="tab"
aria-selected={active}
>
{typeof title === 'function' ? <title /> : title}
</TabButton>
Expand Down
25 changes: 24 additions & 1 deletion code/core/src/core-server/build-static.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cp, mkdir } from 'node:fs/promises';
import { cp, mkdir, writeFile } from 'node:fs/promises';
import { rm } from 'node:fs/promises';

import {
Expand All @@ -11,6 +11,7 @@ import {
import { logger } from 'storybook/internal/node-logger';
import { getPrecedingUpgrade, telemetry } from 'storybook/internal/telemetry';
import type { BuilderOptions, CLIOptions, LoadOptions, Options } from 'storybook/internal/types';
import { type ComponentManifestGenerator } from 'storybook/internal/types';

import { global } from '@storybook/global';

Expand Down Expand Up @@ -163,6 +164,28 @@ export async function buildStaticStandalone(options: BuildStaticStandaloneOption
initializedStoryIndexGenerator as Promise<StoryIndexGenerator>
)
);

if (features?.experimentalComponentsManifest) {
const componentManifestGenerator: ComponentManifestGenerator = await presets.apply(
'experimental_componentManifestGenerator'
);
const indexGenerator = await initializedStoryIndexGenerator;
if (componentManifestGenerator && indexGenerator) {
try {
const manifests = await componentManifestGenerator(
indexGenerator as unknown as import('storybook/internal/core-server').StoryIndexGenerator
);
await mkdir(join(options.outputDir, 'manifests'), { recursive: true });
await writeFile(
join(options.outputDir, 'manifests', 'components.json'),
JSON.stringify(manifests)
);
} catch (e) {
logger.error('Failed to generate manifests/components.json');
logger.error(e instanceof Error ? e : String(e));
}
}
}
}

if (!core?.disableProjectJson) {
Expand Down
32 changes: 30 additions & 2 deletions code/core/src/core-server/dev-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import { logConfig } from 'storybook/internal/common';
import { logger } from 'storybook/internal/node-logger';
import { MissingBuilderError } from 'storybook/internal/server-errors';
import type { Options } from 'storybook/internal/types';
import { type ComponentManifestGenerator } from 'storybook/internal/types';

import compression from '@polka/compression';
import polka from 'polka';
import invariant from 'tiny-invariant';

import { telemetry } from '../telemetry';
import type { StoryIndexGenerator } from './utils/StoryIndexGenerator';
import { type StoryIndexGenerator } from './utils/StoryIndexGenerator';
import { doTelemetry } from './utils/doTelemetry';
import { getManagerBuilder, getPreviewBuilder } from './utils/get-builders';
import { getCachingMiddleware } from './utils/get-caching-middleware';
Expand Down Expand Up @@ -138,8 +139,35 @@ export async function storybookDevServer(options: Options) {
throw indexError;
}

const features = await options.presets.apply('features');
if (features?.experimentalComponentsManifest) {
app.use('/manifests/components.json', async (req, res) => {
try {
const componentManifestGenerator: ComponentManifestGenerator = await options.presets.apply(
'experimental_componentManifestGenerator'
);
const indexGenerator = await initializedStoryIndexGenerator;
if (componentManifestGenerator && indexGenerator) {
const manifest = await componentManifestGenerator(
indexGenerator as unknown as import('storybook/internal/core-server').StoryIndexGenerator
);
res.setHeader('Content-Type', 'application/json');
res.end(JSON.stringify(manifest));
return;
}
res.statusCode = 400;
res.end('No component manifest generator configured.');
return;
} catch (e) {
logger.error(e instanceof Error ? e : String(e));
res.statusCode = 500;
res.end(e instanceof Error ? e.toString() : String(e));
return;
}
});
}
// Now the preview has successfully started, we can count this as a 'dev' event.
doTelemetry(app, core, initializedStoryIndexGenerator, options);
doTelemetry(app, core, initializedStoryIndexGenerator as Promise<StoryIndexGenerator>, options);

async function cancelTelemetry() {
const payload = { eventType: 'dev' };
Expand Down
3 changes: 2 additions & 1 deletion code/core/src/core-server/presets/favicon.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as fs from 'node:fs';
import { expect, it, vi } from 'vitest';

import { logger } from 'storybook/internal/node-logger';
import { type Presets } from 'storybook/internal/types';

import { dirname, join, normalize } from 'pathe';

Expand Down Expand Up @@ -42,7 +43,7 @@ const createOptions = (locations: string[]): Parameters<typeof m.favicon>[1] =>
}
}
},
},
} as Presets,
});

vi.mock('storybook/internal/node-logger', () => {
Expand Down
69 changes: 49 additions & 20 deletions code/core/src/csf-tools/CsfFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface BabelFile {
opts: any;
hub: any;
metadata: object;
path: any;
path: NodePath<t.Program>;
scope: any;
inputMap: object | null;
code: string;
Expand Down Expand Up @@ -287,6 +287,8 @@ export class CsfFile {

_rawComponentPath?: string;

_componentImportSpecifier?: t.ImportSpecifier | t.ImportDefaultSpecifier;

_meta?: StaticMeta;

_stories: Record<string, StaticStory> = {};
Expand All @@ -295,11 +297,16 @@ export class CsfFile {

_storyExports: Record<string, t.VariableDeclarator | t.FunctionDeclaration> = {};

_storyDeclarationPath: Record<string, NodePath<t.VariableDeclarator | t.FunctionDeclaration>> =
{};

_storyPaths: Record<string, NodePath<t.ExportNamedDeclaration>> = {};

_metaStatement: t.Statement | undefined;

_metaNode: t.Expression | undefined;
_metaStatementPath: NodePath<t.Statement> | undefined;

_metaNode: t.ObjectExpression | undefined;

_metaPath: NodePath<t.ExportDefaultDeclaration> | undefined;

Expand Down Expand Up @@ -369,9 +376,18 @@ export class CsfFile {
stmt.specifiers.find((spec) => spec.local.name === id)
) as t.ImportDeclaration;
if (importStmt) {
// Example: `import { ComponentImport } from './path-to-component'`
// const meta = { component: ComponentImport };
// Sets:
// - _rawComponentPath = './path-to-component'
// - _componentImportSpecifier = ComponentImport
const { source } = importStmt;
if (t.isStringLiteral(source)) {
const specifier = importStmt.specifiers.find((spec) => spec.local.name === id);
if (t.isStringLiteral(source) && specifier) {
this._rawComponentPath = source.value;
if (t.isImportSpecifier(specifier) || t.isImportDefaultSpecifier(specifier)) {
this._componentImportSpecifier = specifier;
}
}
}
}
Expand Down Expand Up @@ -465,19 +481,24 @@ export class CsfFile {
// export default meta;
const variableName = (node.declaration as t.Identifier).name;
self._metaVariableName = variableName;
const isVariableDeclarator = (declaration: t.VariableDeclarator) =>
const isMetaVariable = (declaration: t.VariableDeclarator) =>
t.isIdentifier(declaration.id) && declaration.id.name === variableName;

self._metaStatement = self._ast.program.body.find(
(topLevelNode) =>
t.isVariableDeclaration(topLevelNode) &&
topLevelNode.declarations.find(isVariableDeclarator)
);
self._metaStatementPath = self._file.path
.get('body')
.find(
(path) =>
path.isVariableDeclaration() && path.node.declarations.some(isMetaVariable)
);

self._metaStatement = self._metaStatementPath?.node;

decl = ((self?._metaStatement as t.VariableDeclaration)?.declarations || []).find(
isVariableDeclarator
isMetaVariable
)?.init;
} else {
self._metaStatement = node;
self._metaStatementPath = path;
decl = node.declaration;
}

Expand Down Expand Up @@ -518,23 +539,28 @@ export class CsfFile {
ExportNamedDeclaration: {
enter(path) {
const { node, parent } = path;
const declaration = path.get('declaration');
let declarations;
if (t.isVariableDeclaration(node.declaration)) {
declarations = node.declaration.declarations.filter((d) => t.isVariableDeclarator(d));
} else if (t.isFunctionDeclaration(node.declaration)) {
declarations = [node.declaration];
if (declaration.isVariableDeclaration()) {
declarations = declaration.get('declarations').filter((d) => d.isVariableDeclarator());
} else if (declaration.isFunctionDeclaration()) {
declarations = [declaration];
}
if (declarations) {
// export const X = ...;
declarations.forEach((decl: t.VariableDeclarator | t.FunctionDeclaration) => {
if (t.isIdentifier(decl.id)) {
declarations.forEach((declPath) => {
const decl = declPath.node;
const id = declPath.node.id;

if (t.isIdentifier(id)) {
let storyIsFactory = false;
const { name: exportName } = decl.id;
if (exportName === '__namedExportsOrder' && t.isVariableDeclarator(decl)) {
self._namedExportsOrder = parseExportsOrder(decl.init as t.Expression);
const { name: exportName } = id;
if (exportName === '__namedExportsOrder' && declPath.isVariableDeclarator()) {
self._namedExportsOrder = parseExportsOrder(declPath.node.init as t.Expression);
return;
}
self._storyExports[exportName] = decl;
self._storyDeclarationPath[exportName] = declPath;
self._storyPaths[exportName] = path;
self._storyStatements[exportName] = node;
let name = storyNameFromExport(exportName);
Expand Down Expand Up @@ -1025,7 +1051,10 @@ export const babelParseFile = ({
filename?: string;
ast?: t.File;
}): BabelFile => {
return new BabelFileClass({ filename }, { code, ast: ast ?? babelParse(code) });
return new BabelFileClass(
{ filename, highlightCode: false },
{ code, ast: ast ?? babelParse(code) }
);
};

export const loadCsf = (code: string, options: CsfOptions) => {
Expand Down
Loading
Loading