Skip to content

Commit ff7ade5

Browse files
committed
fix example webpack
1 parent 9d17473 commit ff7ade5

File tree

12 files changed

+1665
-1733
lines changed

12 files changed

+1665
-1733
lines changed

examples/vite/src/stories/Button.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { StoryFn, Meta } from '@storybook/react';
22

33
import { Button } from './Button';
4-
import { expect } from '@storybook/test';
4+
import { expect } from 'storybook/test';
55

66
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
77
export default {

examples/vite/src/stories/Header.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { StoryFn, Meta } from '@storybook/react';
22

33
import { Header } from './Header';
4-
import { expect } from '@storybook/test';
4+
import { expect } from 'storybook/test';
55

66
export default {
77
title: 'Example/Header',

examples/vite/src/stories/Page.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { StoryFn, Meta } from '@storybook/react';
2-
import { within, userEvent, expect } from '@storybook/test';
2+
import { within, userEvent, expect } from 'storybook/test';
33
import { Page } from './Page';
44

55
export default {

examples/webpack5/.storybook/main.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
export default {
22
stories: ['../stories/**/*.stories.@(js|jsx|ts|tsx)'],
33

4-
addons: [
5-
'@storybook/addon-essentials',
6-
'@storybook/addon-interactions',
7-
'@storybook/addon-webpack5-compiler-babel',
8-
'@storybook/addon-coverage',
9-
],
4+
addons: ['@storybook/addon-webpack5-compiler-babel', '@storybook/addon-coverage'],
105

116
framework: {
127
name: '@storybook/react-webpack5',

examples/webpack5/package.json

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
"version": "1.0.0",
44
"description": "",
55
"private": true,
6+
"type": "module",
67
"author": "",
78
"scripts": {
89
"dev": "webpack serve --open",
910
"build": "webpack build",
10-
"storybook": "npx storybook dev -p 6006",
11-
"build-storybook": "npx storybook build",
11+
"storybook": "storybook dev -p 6006",
12+
"build-storybook": "storybook build",
1213
"test-storybook": "test-storybook --coverage",
1314
"test-storybook:ci-coverage": "concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"yarn build-storybook --quiet && npx serve storybook-static -l 6006\" \"wait-on tcp:6006 && yarn test-storybook --coverage\""
1415
},
@@ -29,15 +30,12 @@
2930
},
3031
"devDependencies": {
3132
"@storybook/addon-coverage": "portal:../..",
32-
"@storybook/addon-essentials": "^8.4.7",
33-
"@storybook/addon-interactions": "^8.4.7",
3433
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
35-
"@storybook/react": "^8.4.7",
36-
"@storybook/react-webpack5": "^8.4.7",
37-
"@storybook/test": "^8.4.7",
38-
"@storybook/test-runner": "^0.21.0",
34+
"@storybook/react": "^10.0.6",
35+
"@storybook/react-webpack5": "^10.0.6",
36+
"@storybook/test-runner": "^0.24.1",
3937
"concurrently": "^9.1.0",
40-
"storybook": "^8.4.7",
38+
"storybook": "",
4139
"wait-on": "^8.0.1"
4240
},
4341
"packageManager": "yarn@4.5.3"

examples/webpack5/stories/Button.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import type { StoryFn, Meta } from '@storybook/react';
33

44
import { Button } from './Button';
5-
import { expect } from '@storybook/test';
5+
import { expect } from 'storybook/test';
66

77
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
88
export default {

examples/webpack5/stories/Header.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import type { StoryFn, Meta } from '@storybook/react';
3-
import { expect } from '@storybook/test';
3+
import { expect } from 'storybook/test';
44

55
import { Header } from './Header';
66

examples/webpack5/stories/Page.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import type { StoryFn, Meta } from '@storybook/react';
3-
import { within, userEvent, expect } from '@storybook/test';
3+
import { within, userEvent, expect } from 'storybook/test';
44
import { Page } from './Page';
55

66
export default {

0 commit comments

Comments
 (0)