@itcase/storybook-config 1.3.5 → 1.3.6
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/config/addons/addonsReactNativeWeb.d.ts +11 -1
- package/dist/config/addons/addonsReactNativeWeb.js +2 -1
- package/dist/config/config/mainConfigReactNative.js +4 -2
- package/dist/config/config/mainConfigReactNativeWeb.d.ts +11 -1
- package/dist/config/config/mainConfigReactNativeWeb.js +14 -2
- package/package.json +3 -4
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
declare const ADDONS_REACT_NATIVE_WEB: string
|
|
1
|
+
declare const ADDONS_REACT_NATIVE_WEB: (string | {
|
|
2
|
+
name: string;
|
|
3
|
+
options: {
|
|
4
|
+
endpoint: string;
|
|
5
|
+
toolsets: {
|
|
6
|
+
dev: boolean;
|
|
7
|
+
docs: boolean;
|
|
8
|
+
test: boolean;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
})[];
|
|
2
12
|
export { ADDONS_REACT_NATIVE_WEB };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import svgr from 'vite-plugin-svgr';
|
|
2
|
-
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
3
2
|
const MAIN_CONFIG_REACT_NATIVE = {
|
|
4
3
|
viteFinal: async (config) => {
|
|
5
4
|
const { mergeConfig } = await import('vite');
|
|
@@ -10,7 +9,10 @@ const MAIN_CONFIG_REACT_NATIVE = {
|
|
|
10
9
|
optimizeDeps: {
|
|
11
10
|
exclude: ['react-native'],
|
|
12
11
|
},
|
|
13
|
-
plugins: [
|
|
12
|
+
plugins: [svgr({ include: '**/*.svg' })],
|
|
13
|
+
resolve: {
|
|
14
|
+
tsconfigPaths: true,
|
|
15
|
+
},
|
|
14
16
|
});
|
|
15
17
|
},
|
|
16
18
|
core: {
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
declare const MAIN_CONFIG_REACT_NATIVE_WEB: {
|
|
2
2
|
viteFinal: (viteConfig: any) => Promise<Record<string, any>>;
|
|
3
|
-
addons: string
|
|
3
|
+
addons: (string | {
|
|
4
|
+
name: string;
|
|
5
|
+
options: {
|
|
6
|
+
endpoint: string;
|
|
7
|
+
toolsets: {
|
|
8
|
+
dev: boolean;
|
|
9
|
+
docs: boolean;
|
|
10
|
+
test: boolean;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
})[];
|
|
4
14
|
core: {
|
|
5
15
|
disableTelemetry: boolean;
|
|
6
16
|
disableWhatsNewNotifications: boolean;
|
|
@@ -2,10 +2,19 @@ import path from 'path';
|
|
|
2
2
|
import { fileURLToPath } from 'url';
|
|
3
3
|
import { mergeConfig } from 'vite';
|
|
4
4
|
import babel from 'vite-plugin-babel';
|
|
5
|
+
import { ADDONS_REACT_NATIVE_WEB } from '../addons/addonsReactNativeWeb.js';
|
|
5
6
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
6
7
|
const MAIN_CONFIG_REACT_NATIVE_WEB = {
|
|
7
8
|
viteFinal: async (viteConfig) => {
|
|
8
|
-
|
|
9
|
+
// @storybook/react-native-web-vite still injects vite-tsconfig-paths;
|
|
10
|
+
// Vite 8 supports this natively and warns if the plugin is present.
|
|
11
|
+
const plugins = (viteConfig.plugins ?? [])
|
|
12
|
+
.flat(Infinity)
|
|
13
|
+
.filter((plugin) => plugin?.name !== 'vite-tsconfig-paths');
|
|
14
|
+
return mergeConfig({
|
|
15
|
+
...viteConfig,
|
|
16
|
+
plugins,
|
|
17
|
+
}, {
|
|
9
18
|
plugins: [
|
|
10
19
|
babel({
|
|
11
20
|
babelConfig: {
|
|
@@ -14,9 +23,12 @@ const MAIN_CONFIG_REACT_NATIVE_WEB = {
|
|
|
14
23
|
},
|
|
15
24
|
}),
|
|
16
25
|
],
|
|
26
|
+
resolve: {
|
|
27
|
+
tsconfigPaths: true,
|
|
28
|
+
},
|
|
17
29
|
});
|
|
18
30
|
},
|
|
19
|
-
addons:
|
|
31
|
+
addons: ADDONS_REACT_NATIVE_WEB,
|
|
20
32
|
core: {
|
|
21
33
|
disableTelemetry: true,
|
|
22
34
|
disableWhatsNewNotifications: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/storybook-config",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"author": "ITCase",
|
|
5
5
|
"description": "Storybook configuration package",
|
|
6
6
|
"engines": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"build": "npm run build-js",
|
|
11
11
|
"build-js": "rm -rf dist && tsc -p tsconfig.build.json && NODE_ENV=production rollup -c",
|
|
12
12
|
"typecheck": "tsc --noEmit --pretty -p tsconfig.json",
|
|
13
|
-
"prepare": "
|
|
13
|
+
"prepare": "husky && node node_modules/@itcase/config/husky-hooks/install-launcher.js",
|
|
14
14
|
"prepack": "npm run build",
|
|
15
15
|
"ios": "react-native run-ios -- --reset-cache",
|
|
16
16
|
"android": "react-native run-android -- --reset-cache",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
101
|
"@gorhom/bottom-sheet": "^5.2.14",
|
|
102
|
-
"@itcase/config": "^1.6.
|
|
102
|
+
"@itcase/config": "^1.6.69",
|
|
103
103
|
"@itcase/storybook-addon-auth": "^1.0.5",
|
|
104
104
|
"@react-native-async-storage/async-storage": "^3.1.1",
|
|
105
105
|
"@react-native-community/datetimepicker": "^9.1.0",
|
|
@@ -148,7 +148,6 @@
|
|
|
148
148
|
"vite": "^8.2.1",
|
|
149
149
|
"vite-plugin-babel": "^1.7.3",
|
|
150
150
|
"vite-plugin-svgr": "^5.2.0",
|
|
151
|
-
"vite-tsconfig-paths": "^6.1.1",
|
|
152
151
|
"vitest": "^4.1.10"
|
|
153
152
|
},
|
|
154
153
|
"devDependencies": {
|