@itcase/storybook-config 1.3.6 → 1.3.7

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.
@@ -1,9 +1,16 @@
1
- import path from 'path';
2
- import { fileURLToPath } from 'url';
3
1
  import { mergeConfig } from 'vite';
4
- import babel from 'vite-plugin-babel';
2
+ import svgr from 'vite-plugin-svgr';
5
3
  import { ADDONS_REACT_NATIVE_WEB } from '../addons/addonsReactNativeWeb.js';
6
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
4
+ const REACT_NATIVE_WEB_EXTENSIONS = [
5
+ '.web.tsx',
6
+ '.web.ts',
7
+ '.web.jsx',
8
+ '.web.js',
9
+ '.tsx',
10
+ '.ts',
11
+ '.jsx',
12
+ '.js',
13
+ ];
7
14
  const MAIN_CONFIG_REACT_NATIVE_WEB = {
8
15
  viteFinal: async (viteConfig) => {
9
16
  // @storybook/react-native-web-vite still injects vite-tsconfig-paths;
@@ -15,16 +22,23 @@ const MAIN_CONFIG_REACT_NATIVE_WEB = {
15
22
  ...viteConfig,
16
23
  plugins,
17
24
  }, {
18
- plugins: [
19
- babel({
20
- babelConfig: {
21
- babelrc: false,
22
- configFile: path.resolve(__dirname, '../../../babel.config.js'),
23
- },
24
- }),
25
- ],
25
+ optimizeDeps: {
26
+ esbuildOptions: {
27
+ resolveExtensions: REACT_NATIVE_WEB_EXTENSIONS,
28
+ },
29
+ exclude: ['react-native'],
30
+ include: ['react-native-web', 'react-native-svg'],
31
+ },
32
+ plugins: [svgr({ include: '**/*.svg' })],
26
33
  resolve: {
27
- tsconfigPaths: true,
34
+ alias: [
35
+ {
36
+ find: /^react-native$/,
37
+ replacement: 'react-native-web',
38
+ },
39
+ ],
40
+ dedupe: ['react', 'react-dom', 'react-native', 'react-native-web'],
41
+ extensions: REACT_NATIVE_WEB_EXTENSIONS,
28
42
  },
29
43
  });
30
44
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/storybook-config",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "author": "ITCase",
5
5
  "description": "Storybook configuration package",
6
6
  "engines": {
@@ -104,8 +104,8 @@
104
104
  "@react-native-async-storage/async-storage": "^3.1.1",
105
105
  "@react-native-community/datetimepicker": "^9.1.0",
106
106
  "@storybook/addon-designs": "^11.1.4",
107
- "@storybook/addon-docs": "^10.5.7",
108
- "@storybook/addon-links": "^10.5.7",
107
+ "@storybook/addon-docs": "^10.5.8",
108
+ "@storybook/addon-links": "^10.5.8",
109
109
  "@storybook/addon-mcp": "^0.7.0",
110
110
  "@storybook/addon-ondevice-actions": "10.5.4",
111
111
  "@storybook/addon-ondevice-backgrounds": "10.5.4",
@@ -113,19 +113,19 @@
113
113
  "@storybook/addon-ondevice-notes": "^10.5.4",
114
114
  "@storybook/addon-react-native-web": "^0.0.29",
115
115
  "@storybook/addon-styling-webpack": "^3.0.2",
116
- "@storybook/addon-themes": "^10.5.7",
117
- "@storybook/addon-vitest": "^10.5.7",
116
+ "@storybook/addon-themes": "^10.5.8",
117
+ "@storybook/addon-vitest": "^10.5.8",
118
118
  "@storybook/addon-webpack5-compiler-swc": "^4.0.3",
119
- "@storybook/builder-vite": "^10.5.7",
119
+ "@storybook/builder-vite": "^10.5.8",
120
120
  "@storybook/mcp": "0.8.0",
121
- "@storybook/nextjs": "^10.5.7",
122
- "@storybook/nextjs-vite": "^10.5.7",
123
- "@storybook/react": "^10.5.7",
121
+ "@storybook/nextjs": "^10.5.8",
122
+ "@storybook/nextjs-vite": "^10.5.8",
123
+ "@storybook/react": "^10.5.8",
124
124
  "@storybook/react-native": "10.5.4",
125
125
  "@storybook/react-native-ui-lite": "10.5.4",
126
- "@storybook/react-native-web-vite": "^10.5.7",
127
- "@storybook/react-vite": "^10.5.7",
128
- "@storybook/react-webpack5": "^10.5.7",
126
+ "@storybook/react-native-web-vite": "^10.5.8",
127
+ "@storybook/react-vite": "^10.5.8",
128
+ "@storybook/react-webpack5": "^10.5.8",
129
129
  "@vitejs/plugin-react": "^6.0.5",
130
130
  "@vitest/browser-playwright": "^4.1.10",
131
131
  "babel-loader": "^10.1.1",
@@ -136,14 +136,14 @@
136
136
  "http-proxy-middleware": "^4.2.0",
137
137
  "msw": "^2.15.0",
138
138
  "msw-storybook-addon": "^3.0.0",
139
- "react-native-gesture-handler": "^3.1.0",
139
+ "react-native-gesture-handler": "^3.2.1",
140
140
  "react-native-reanimated": "^4.5.3",
141
141
  "react-native-safe-area-context": "^5.9.0",
142
142
  "react-native-svg": "^15.15.5",
143
143
  "react-native-web": "^0.21.2",
144
144
  "react-native-worklets": "^0.11.4",
145
145
  "srvx": "^0.12.5",
146
- "storybook": "^10.5.7",
146
+ "storybook": "^10.5.8",
147
147
  "storybook-addon-source-link": "^2.0.1",
148
148
  "vite": "^8.2.1",
149
149
  "vite-plugin-babel": "^1.7.3",
@@ -158,10 +158,10 @@
158
158
  "@babel/runtime": "^8.0.0",
159
159
  "@commitlint/cli": "^21.2.2",
160
160
  "@commitlint/config-conventional": "^21.2.2",
161
- "@itcase/common": "^1.2.51",
162
- "@itcase/lint": "^1.1.121",
163
- "@itcase/ui-core": "^1.10.71",
164
- "@itcase/ui-web": "^1.10.72",
161
+ "@itcase/common": "^1.2.53",
162
+ "@itcase/lint": "^1.1.122",
163
+ "@itcase/ui-core": "^1.10.78",
164
+ "@itcase/ui-web": "^1.10.78",
165
165
  "@react-native-community/cli": "20.2.0",
166
166
  "@react-native-community/cli-platform-android": "20.2.0",
167
167
  "@react-native-community/cli-platform-ios": "20.2.0",
@@ -173,7 +173,7 @@
173
173
  "@rollup/plugin-commonjs": "^29.0.3",
174
174
  "@rollup/plugin-json": "^6.1.0",
175
175
  "@rollup/plugin-node-resolve": "^16.0.3",
176
- "@storybook/addon-docs": "^10.5.7",
176
+ "@storybook/addon-docs": "^10.5.8",
177
177
  "@types/react": "^18",
178
178
  "@types/react-dom": "^18",
179
179
  "babel-plugin-transform-inline-environment-variables": "^0.4.4",
@@ -182,7 +182,7 @@
182
182
  "glob": "^13.0.6",
183
183
  "husky": "^9.1.7",
184
184
  "lint-staged": "^17.3.0",
185
- "next": "^16.3.0",
185
+ "next": "^16.3.1",
186
186
  "prettier": "^3.9.6",
187
187
  "react": "^18",
188
188
  "react-docgen": "^8.0.3",