@storybook/react-native-web-vite 10.1.0-alpha.9 → 10.1.0-beta.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.
- package/dist/node/index.js +6 -10
- package/dist/preset.js +14 -25
- package/dist/vite-plugin.js +12 -17
- package/package.json +7 -7
- package/dist/_node-chunks/chunk-DQGSITUA.js +0 -17
package/dist/node/index.js
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_m238fiony3 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_m238fiony3 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_m238fiony3 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_m238fiony3.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_m238fiony3.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_m238fiony3.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
__name
|
|
14
|
-
} from "../_node-chunks/chunk-DQGSITUA.js";
|
|
15
12
|
|
|
16
13
|
// src/node/index.ts
|
|
17
14
|
function defineMain(config) {
|
|
18
15
|
return config;
|
|
19
16
|
}
|
|
20
|
-
__name(defineMain, "defineMain");
|
|
21
17
|
export {
|
|
22
18
|
defineMain
|
|
23
19
|
};
|
package/dist/preset.js
CHANGED
|
@@ -1,36 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_m238fiony3 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_m238fiony3 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_m238fiony3 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_m238fiony3.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_m238fiony3.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_m238fiony3.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
__name
|
|
14
|
-
} from "./_node-chunks/chunk-DQGSITUA.js";
|
|
15
12
|
|
|
16
13
|
// src/preset.ts
|
|
17
14
|
import { viteFinal as reactViteFinal } from "@storybook/react-vite/preset";
|
|
18
15
|
import { rnw } from "vite-plugin-rnw";
|
|
19
16
|
import tsconfigPaths from "vite-tsconfig-paths";
|
|
20
|
-
var getExcludeOptions =
|
|
21
|
-
|
|
22
|
-
const uniqueModulesToTranspile = Array.from(
|
|
17
|
+
var getExcludeOptions = (modulesToTranspile) => {
|
|
18
|
+
let defaultModulesToTranspile = ["react-native", "@react-native", "expo", "@expo"], uniqueModulesToTranspile = Array.from(
|
|
23
19
|
/* @__PURE__ */ new Set([...modulesToTranspile, ...defaultModulesToTranspile])
|
|
24
20
|
);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
return {};
|
|
29
|
-
}, "getExcludeOptions");
|
|
30
|
-
var viteFinal = /* @__PURE__ */ __name(async (config, options) => {
|
|
31
|
-
const { mergeConfig } = await import("vite");
|
|
32
|
-
const { pluginReactOptions = {}, modulesToTranspile = [] } = await options.presets.apply("frameworkOptions");
|
|
33
|
-
const { plugins = [], ...reactConfigWithoutPlugins } = await reactViteFinal(config, options);
|
|
21
|
+
return modulesToTranspile.length ? { exclude: new RegExp(`/node_modules/(?!${uniqueModulesToTranspile.join("|")})`) } : {};
|
|
22
|
+
}, viteFinal = async (config, options) => {
|
|
23
|
+
let { mergeConfig } = await import("vite"), { pluginReactOptions = {}, modulesToTranspile = [] } = await options.presets.apply("frameworkOptions"), { plugins = [], ...reactConfigWithoutPlugins } = await reactViteFinal(config, options);
|
|
34
24
|
return mergeConfig(reactConfigWithoutPlugins, {
|
|
35
25
|
plugins: [
|
|
36
26
|
tsconfigPaths(),
|
|
@@ -39,16 +29,15 @@ var viteFinal = /* @__PURE__ */ __name(async (config, options) => {
|
|
|
39
29
|
...pluginReactOptions,
|
|
40
30
|
jsxRuntime: pluginReactOptions.jsxRuntime || "automatic",
|
|
41
31
|
babel: {
|
|
42
|
-
babelrc:
|
|
43
|
-
configFile:
|
|
32
|
+
babelrc: !1,
|
|
33
|
+
configFile: !1,
|
|
44
34
|
...pluginReactOptions.babel
|
|
45
35
|
}
|
|
46
36
|
}),
|
|
47
37
|
...plugins
|
|
48
38
|
]
|
|
49
39
|
});
|
|
50
|
-
},
|
|
51
|
-
var core = {
|
|
40
|
+
}, core = {
|
|
52
41
|
builder: import.meta.resolve("@storybook/builder-vite"),
|
|
53
42
|
renderer: import.meta.resolve("@storybook/react/preset")
|
|
54
43
|
};
|
package/dist/vite-plugin.js
CHANGED
|
@@ -1,29 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_m238fiony3 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_m238fiony3 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_m238fiony3 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_m238fiony3.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_m238fiony3.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_m238fiony3.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
__name
|
|
14
|
-
} from "./_node-chunks/chunk-DQGSITUA.js";
|
|
15
12
|
|
|
16
13
|
// src/vite-plugin.ts
|
|
17
14
|
import { rnw } from "vite-plugin-rnw";
|
|
18
15
|
import tsconfigPaths from "vite-tsconfig-paths";
|
|
19
|
-
var storybookReactNativeWeb =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
];
|
|
26
|
-
}, "storybookReactNativeWeb");
|
|
16
|
+
var storybookReactNativeWeb = () => [
|
|
17
|
+
tsconfigPaths(),
|
|
18
|
+
rnw({
|
|
19
|
+
jsxRuntime: "automatic"
|
|
20
|
+
})
|
|
21
|
+
];
|
|
27
22
|
export {
|
|
28
23
|
storybookReactNativeWeb
|
|
29
24
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-native-web-vite",
|
|
3
|
-
"version": "10.1.0-
|
|
3
|
+
"version": "10.1.0-beta.0",
|
|
4
4
|
"description": "Storybook for React Native Web and Vite: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"prep": "jiti ../../../scripts/build/build-package.ts"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@storybook/builder-vite": "10.1.0-
|
|
57
|
-
"@storybook/react": "10.1.0-
|
|
58
|
-
"@storybook/react-vite": "10.1.0-
|
|
59
|
-
"vite-plugin-rnw": "^0.0.
|
|
56
|
+
"@storybook/builder-vite": "10.1.0-beta.0",
|
|
57
|
+
"@storybook/react": "10.1.0-beta.0",
|
|
58
|
+
"@storybook/react-vite": "10.1.0-beta.0",
|
|
59
|
+
"vite-plugin-rnw": "^0.0.10",
|
|
60
60
|
"vite-tsconfig-paths": "^5.1.4"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
@@ -68,11 +68,11 @@
|
|
|
68
68
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
69
69
|
"react-native": ">=0.74.5",
|
|
70
70
|
"react-native-web": "^0.19.12 || ^0.20.0 || ^0.21.0",
|
|
71
|
-
"storybook": "^10.1.0-
|
|
71
|
+
"storybook": "^10.1.0-beta.0",
|
|
72
72
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
|
|
73
73
|
},
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "a8e7fd8a655c69780bc20b9749d2699e45beae1l"
|
|
78
78
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_5t1bixn33bu from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_5t1bixn33bu from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_5t1bixn33bu from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_5t1bixn33bu.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_5t1bixn33bu.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_5t1bixn33bu.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
var __defProp = Object.defineProperty;
|
|
13
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
__name
|
|
17
|
-
};
|