@storybook/react 6.1.7 → 6.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/framework-preset-react.js +12 -1
- package/package.json +17 -16
- package/types/index.ts +11 -0
|
@@ -35,7 +35,7 @@ async function babel(config, options) {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
return _objectSpread(_objectSpread({}, config), {}, {
|
|
38
|
-
plugins: [require.resolve('react-refresh/babel'), ...(config.plugins || [])]
|
|
38
|
+
plugins: [[require.resolve('react-refresh/babel'), {}, 'storybook-react-refresh'], ...(config.plugins || [])]
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -73,6 +73,17 @@ async function webpackFinal(config, options) {
|
|
|
73
73
|
var fastRefreshEnabled = isDevelopment && (reactOptions.fastRefresh || process.env.FAST_REFRESH === 'true');
|
|
74
74
|
|
|
75
75
|
if (!fastRefreshEnabled) {
|
|
76
|
+
return config;
|
|
77
|
+
} // matches the name of the plugin in CRA.
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
var hasReactRefresh = config.plugins.find(function (p) {
|
|
81
|
+
return p.constructor.name === 'ReactRefreshPlugin';
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
if (hasReactRefresh) {
|
|
85
|
+
_nodeLogger.logger.warn("=> React refresh is already set. You don't need to set the option");
|
|
86
|
+
|
|
76
87
|
return config;
|
|
77
88
|
}
|
|
78
89
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.11",
|
|
4
4
|
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -17,16 +17,6 @@
|
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"main": "dist/client/index.js",
|
|
19
19
|
"types": "dist/client/index.d.ts",
|
|
20
|
-
"typesVersions": {
|
|
21
|
-
"<3.8": {
|
|
22
|
-
"types-6-0": [
|
|
23
|
-
"ts3.4/dist/client/preview/types-6-0.d.ts"
|
|
24
|
-
],
|
|
25
|
-
"*": [
|
|
26
|
-
"ts3.4/*"
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
20
|
"bin": {
|
|
31
21
|
"build-storybook": "./bin/build.js",
|
|
32
22
|
"start-storybook": "./bin/index.js",
|
|
@@ -35,6 +25,7 @@
|
|
|
35
25
|
"files": [
|
|
36
26
|
"bin/**/*",
|
|
37
27
|
"dist/**/*",
|
|
28
|
+
"types/**/*",
|
|
38
29
|
"README.md",
|
|
39
30
|
"*.js",
|
|
40
31
|
"*.d.ts",
|
|
@@ -47,9 +38,9 @@
|
|
|
47
38
|
"@babel/preset-flow": "^7.12.1",
|
|
48
39
|
"@babel/preset-react": "^7.12.1",
|
|
49
40
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.4.2",
|
|
50
|
-
"@storybook/addons": "6.1.
|
|
51
|
-
"@storybook/core": "6.1.
|
|
52
|
-
"@storybook/node-logger": "6.1.
|
|
41
|
+
"@storybook/addons": "6.1.11",
|
|
42
|
+
"@storybook/core": "6.1.11",
|
|
43
|
+
"@storybook/node-logger": "6.1.11",
|
|
53
44
|
"@storybook/semver": "^7.3.2",
|
|
54
45
|
"@types/webpack-env": "^1.15.3",
|
|
55
46
|
"babel-plugin-add-react-displayname": "^0.0.5",
|
|
@@ -67,7 +58,7 @@
|
|
|
67
58
|
"webpack": "^4.44.2"
|
|
68
59
|
},
|
|
69
60
|
"devDependencies": {
|
|
70
|
-
"@storybook/client-api": "6.1.
|
|
61
|
+
"@storybook/client-api": "6.1.11",
|
|
71
62
|
"@types/node": "^14.0.10",
|
|
72
63
|
"@types/webpack": "^4.41.24"
|
|
73
64
|
},
|
|
@@ -82,5 +73,15 @@
|
|
|
82
73
|
"publishConfig": {
|
|
83
74
|
"access": "public"
|
|
84
75
|
},
|
|
85
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "5999b789d796414997c21d74517f7dfede6ddeff",
|
|
77
|
+
"typesVersions": {
|
|
78
|
+
"<3.8": {
|
|
79
|
+
"types-6-0": [
|
|
80
|
+
"ts3.4/dist/client/preview/types-6-0.d.ts"
|
|
81
|
+
],
|
|
82
|
+
"*": [
|
|
83
|
+
"ts3.4/*"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
86
87
|
}
|
package/types/index.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { StorybookConfig as BaseConfig } from '@storybook/core/types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The interface for Storybook configuration in `main.ts` files.
|
|
5
|
+
*/
|
|
6
|
+
export interface StorybookConfig extends BaseConfig {
|
|
7
|
+
reactOptions?: {
|
|
8
|
+
fastRefresh?: boolean;
|
|
9
|
+
strictMode?: boolean;
|
|
10
|
+
};
|
|
11
|
+
}
|