@storybook/react-native 8.3.7 → 8.3.8
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/metro/withStorybook.js +15 -6
- package/package.json +4 -4
package/metro/withStorybook.js
CHANGED
|
@@ -48,20 +48,29 @@ module.exports = (
|
|
|
48
48
|
},
|
|
49
49
|
resolver: {
|
|
50
50
|
...config.resolver,
|
|
51
|
-
unstable_enablePackageExports: true,
|
|
52
51
|
resolveRequest: (context, moduleName, platform) => {
|
|
53
|
-
const
|
|
54
|
-
? config?.resolver?.resolveRequest
|
|
55
|
-
: context.resolveRequest
|
|
52
|
+
const resolveFunction = config?.resolver?.resolveRequest
|
|
53
|
+
? config?.resolver?.resolveRequest
|
|
54
|
+
: context.resolveRequest;
|
|
55
|
+
|
|
56
|
+
const isStorybookModule =
|
|
57
|
+
moduleName.startsWith('storybook') || moduleName.startsWith('@storybook');
|
|
58
|
+
|
|
59
|
+
if (isStorybookModule) {
|
|
60
|
+
context.unstable_enablePackageExports = true;
|
|
61
|
+
context.unstable_conditionNames = ['import'];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const resolveResult = resolveFunction(context, moduleName, platform);
|
|
56
65
|
|
|
57
66
|
// workaround for template files with invalid imports
|
|
58
|
-
if (
|
|
67
|
+
if (resolveResult?.filePath?.includes?.('@storybook/react/template/cli')) {
|
|
59
68
|
return {
|
|
60
69
|
type: 'empty',
|
|
61
70
|
};
|
|
62
71
|
}
|
|
63
72
|
|
|
64
|
-
return
|
|
73
|
+
return resolveResult;
|
|
65
74
|
},
|
|
66
75
|
},
|
|
67
76
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-native",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.8",
|
|
4
4
|
"description": "A better way to develop React Native Components for your app",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"@storybook/csf": "^0.1.1",
|
|
44
44
|
"@storybook/global": "^5.0.0",
|
|
45
45
|
"@storybook/react": "^8.3.5",
|
|
46
|
-
"@storybook/react-native-theming": "^8.3.
|
|
47
|
-
"@storybook/react-native-ui": "^8.3.
|
|
46
|
+
"@storybook/react-native-theming": "^8.3.8",
|
|
47
|
+
"@storybook/react-native-ui": "^8.3.8",
|
|
48
48
|
"chokidar": "^3.5.1",
|
|
49
49
|
"commander": "^8.2.0",
|
|
50
50
|
"dedent": "^1.5.1",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "8c7d02652d29dc2ba84a26362e5a45851d77f1a4"
|
|
86
86
|
}
|