Skip to content

Commit

Permalink
Merge branch 'next' into outline-ts
Browse files Browse the repository at this point in the history
  • Loading branch information
kyletsang authored May 4, 2023
2 parents d0cc7b6 + 2350c14 commit 1219960
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
8 changes: 6 additions & 2 deletions code/lib/builder-webpack5/src/preview/babel-loader-preview.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { getProjectRoot } from '@storybook/core-common';
import type { TypescriptOptions } from '../types';

export const createBabelLoader = (options: any, typescriptOptions: TypescriptOptions) => {
export const createBabelLoader = (
options: any,
typescriptOptions: TypescriptOptions,
excludes: string[] = []
) => {
return {
test: typescriptOptions.skipBabel ? /\.(mjs|jsx?)$/ : /\.(mjs|tsx?|jsx?)$/,
use: [
Expand All @@ -11,6 +15,6 @@ export const createBabelLoader = (options: any, typescriptOptions: TypescriptOpt
},
],
include: [getProjectRoot()],
exclude: /node_modules/,
exclude: [/node_modules/, ...excludes],
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export default async (
fullySpecified: false,
},
},
createBabelLoader(babelOptions, typescriptOptions),
createBabelLoader(babelOptions, typescriptOptions, Object.keys(virtualModuleMapping)),
{
test: /\.md$/,
type: 'asset/source',
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/common/checkbox-story.mdx.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
```mdx
{/* Checkbox.mdx */}

import { Canvas, Meta, Story } from '@storybook/blocks';
import { Canvas, Meta } from '@storybook/blocks';

import * as CheckboxStories from './Checkbox.stories';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
```mdx
{/* Checkbox.mdx */}

import { Canvas, Meta, Story } from '@storybook/blocks';
import { Canvas, Meta } from '@storybook/blocks';

import * as CheckboxStories from './Checkbox.stories';
```
2 changes: 1 addition & 1 deletion docs/snippets/vue/button-story-click-handler-args.3.js.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const Text = {
onClick: action('clicked'),
};
},
template: '<Button @onClick="onClick" :label="label" />',
template: '<Button @click="onClick" :label="label" />',
}),
args: {
label: 'Hello',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const Primary: Story = {
onClick: action('clicked'),
};
},
template: '<Button @onClick="onClick" :label="label" />',
template: '<Button @click="onClick" :label="label" />',
}),
args: {
label: 'Hello',
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/vue/button-story-click-handler-args.3.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const Primary: Story = {
onClick: action('clicked'),
};
},
template: '<Button @onClick="onClick" :label="label" />',
template: '<Button @click="onClick" :label="label" />',
}),
args: {
label: 'Hello',
Expand Down

0 comments on commit 1219960

Please sign in to comment.