@storybook/react-native 8.3.7 → 8.3.8-alpha.0

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.
@@ -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 defaultResolveResult = config?.resolver?.resolveRequest
54
- ? config?.resolver?.resolveRequest?.(context, moduleName, platform)
55
- : context.resolveRequest(context, moduleName, platform);
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 (defaultResolveResult?.filePath?.includes?.('@storybook/react/template/cli')) {
67
+ if (resolveResult?.filePath?.includes?.('@storybook/react/template/cli')) {
59
68
  return {
60
69
  type: 'empty',
61
70
  };
62
71
  }
63
72
 
64
- return defaultResolveResult;
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.7",
3
+ "version": "8.3.8-alpha.0",
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.7",
47
- "@storybook/react-native-ui": "^8.3.7",
46
+ "@storybook/react-native-theming": "^8.3.8-alpha.0",
47
+ "@storybook/react-native-ui": "^8.3.8-alpha.0",
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": "d7b099e59708b0ea8651552312c9991c1829a3de"
85
+ "gitHead": "99b3882d47685a441d1f5aa2f50939fc17cb919f"
86
86
  }