vxrn 0.1.43 → 0.1.45
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/cjs/cli.js +6 -1
- package/dist/cjs/cli.js.map +1 -1
- package/dist/cjs/cli.native.js +6 -1
- package/dist/cjs/cli.native.js.map +2 -2
- package/dist/cjs/constants.js +63 -55
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/constants.native.js +65 -58
- package/dist/cjs/constants.native.js.map +2 -2
- package/dist/cjs/exports/build.js +2 -2
- package/dist/cjs/exports/build.js.map +1 -1
- package/dist/cjs/exports/build.native.js +2 -2
- package/dist/cjs/exports/build.native.js.map +2 -2
- package/dist/cjs/exports/dev.js +27 -12
- package/dist/cjs/exports/dev.js.map +1 -1
- package/dist/cjs/exports/dev.native.js +103 -32
- package/dist/cjs/exports/dev.native.js.map +2 -2
- package/dist/cjs/plugins/reactNativeCommonJsPlugin.js +1 -1
- package/dist/cjs/plugins/reactNativeCommonJsPlugin.js.map +1 -1
- package/dist/cjs/plugins/reactNativeCommonJsPlugin.native.js +1 -1
- package/dist/cjs/plugins/reactNativeCommonJsPlugin.native.js.map +2 -2
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/utils/getBaseViteConfig.js.map +1 -1
- package/dist/cjs/utils/getBaseViteConfig.native.js.map +1 -1
- package/dist/cjs/utils/getOptionsFilled.js +6 -1
- package/dist/cjs/utils/getOptionsFilled.js.map +1 -1
- package/dist/cjs/utils/getOptionsFilled.native.js +6 -2
- package/dist/cjs/utils/getOptionsFilled.native.js.map +2 -2
- package/dist/esm/cli.js +6 -1
- package/dist/esm/cli.js.map +1 -1
- package/dist/esm/cli.mjs +6 -1
- package/dist/esm/cli.native.js +6 -1
- package/dist/esm/cli.native.js.map +2 -2
- package/dist/esm/constants.js +63 -55
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/constants.mjs +6 -22
- package/dist/esm/constants.native.js +64 -55
- package/dist/esm/constants.native.js.map +2 -2
- package/dist/esm/exports/build.js +3 -3
- package/dist/esm/exports/build.js.map +1 -1
- package/dist/esm/exports/build.mjs +3 -3
- package/dist/esm/exports/build.native.js +3 -3
- package/dist/esm/exports/build.native.js.map +2 -2
- package/dist/esm/exports/dev.js +29 -14
- package/dist/esm/exports/dev.js.map +1 -1
- package/dist/esm/exports/dev.mjs +27 -14
- package/dist/esm/exports/dev.native.js +105 -34
- package/dist/esm/exports/dev.native.js.map +2 -2
- package/dist/esm/plugins/reactNativeCommonJsPlugin.js +1 -1
- package/dist/esm/plugins/reactNativeCommonJsPlugin.js.map +1 -1
- package/dist/esm/plugins/reactNativeCommonJsPlugin.mjs +1 -1
- package/dist/esm/plugins/reactNativeCommonJsPlugin.native.js +1 -1
- package/dist/esm/plugins/reactNativeCommonJsPlugin.native.js.map +2 -2
- package/dist/esm/utils/getBaseViteConfig.js.map +1 -1
- package/dist/esm/utils/getBaseViteConfig.native.js.map +1 -1
- package/dist/esm/utils/getOptionsFilled.js +6 -1
- package/dist/esm/utils/getOptionsFilled.js.map +1 -1
- package/dist/esm/utils/getOptionsFilled.mjs +7 -1
- package/dist/esm/utils/getOptionsFilled.native.js +6 -2
- package/dist/esm/utils/getOptionsFilled.native.js.map +2 -2
- package/package.json +8 -12
- package/src/cli.ts +6 -1
- package/src/constants.ts +68 -59
- package/src/exports/build.ts +3 -3
- package/src/exports/dev.ts +54 -24
- package/src/plugins/reactNativeCommonJsPlugin.ts +0 -2
- package/src/types.ts +11 -1
- package/src/utils/getBaseViteConfig.ts +2 -0
- package/src/utils/getOptionsFilled.ts +6 -1
- package/types/constants.d.ts +3 -5
- package/types/exports/dev.d.ts +3 -1
- package/types/types.d.ts +11 -1
- package/types/utils/getOptionsFilled.d.ts +4 -1
|
@@ -10,7 +10,7 @@ const require = createRequire(import.meta.url)
|
|
|
10
10
|
export type VXRNConfigFilled = Awaited<ReturnType<typeof getOptionsFilled>>
|
|
11
11
|
|
|
12
12
|
export async function getOptionsFilled(options: VXRNConfig) {
|
|
13
|
-
const { host = '127.0.0.1', root = process.cwd() } = options
|
|
13
|
+
const { host = '127.0.0.1', root = process.cwd(), entries } = options
|
|
14
14
|
|
|
15
15
|
const defaultPort = options.port || 8081
|
|
16
16
|
const port = await getPort({
|
|
@@ -30,6 +30,11 @@ export async function getOptionsFilled(options: VXRNConfig) {
|
|
|
30
30
|
])
|
|
31
31
|
return {
|
|
32
32
|
...options,
|
|
33
|
+
entries: {
|
|
34
|
+
native: './src/entry-native.tsx',
|
|
35
|
+
server: './src/entry-server.tsx',
|
|
36
|
+
...entries,
|
|
37
|
+
},
|
|
33
38
|
packageJSON,
|
|
34
39
|
state,
|
|
35
40
|
packageRootDir,
|
package/types/constants.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
export declare const DEFAULT_PORT = 8081;
|
|
2
|
-
export declare const depsToOptimize: string[];
|
|
3
|
-
export declare const needsInterop: string[];
|
|
4
|
-
export declare const ssrDepsToOptimize: string[];
|
|
5
2
|
export declare const nativeExtensions: string[];
|
|
6
3
|
export declare const webExtensions: string[];
|
|
7
|
-
export declare const
|
|
4
|
+
export declare const depsToOptimize: string[];
|
|
5
|
+
export declare const optimizeDeps: {
|
|
8
6
|
include: string[];
|
|
9
|
-
extensions: string[];
|
|
10
7
|
needsInterop: string[];
|
|
8
|
+
exclude: string[];
|
|
11
9
|
esbuildOptions: {
|
|
12
10
|
resolveExtensions: string[];
|
|
13
11
|
};
|
package/types/exports/dev.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { VXRNConfig } from '../types';
|
|
3
3
|
export declare const resolveFile: (path: string) => string;
|
|
4
|
-
export declare const dev: (
|
|
4
|
+
export declare const dev: ({ clean, ...rest }: VXRNConfig & {
|
|
5
|
+
clean?: boolean;
|
|
6
|
+
}) => Promise<{
|
|
5
7
|
server: import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>;
|
|
6
8
|
viteServer: import("vite").ViteDevServer;
|
|
7
9
|
start(): Promise<{
|
package/types/types.d.ts
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import type { Options as FlowOptions } from '@vxrn/vite-flow';
|
|
2
2
|
import type { InlineConfig } from 'vite';
|
|
3
3
|
export type VXRNConfig = {
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* The entry points to your app. For web, it uses your `root` and looks for an index.html
|
|
6
|
+
*
|
|
7
|
+
* Defaults:
|
|
8
|
+
* native: ./src/entry-native.tsx
|
|
9
|
+
* server: ./src/entry-server.tsx
|
|
10
|
+
*/
|
|
11
|
+
entries?: {
|
|
12
|
+
native?: string;
|
|
13
|
+
server?: string;
|
|
14
|
+
};
|
|
5
15
|
root?: string;
|
|
6
16
|
host?: string;
|
|
7
17
|
port?: number;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { VXRNConfig } from '../types';
|
|
2
2
|
export type VXRNConfigFilled = Awaited<ReturnType<typeof getOptionsFilled>>;
|
|
3
3
|
export declare function getOptionsFilled(options: VXRNConfig): Promise<{
|
|
4
|
+
entries: {
|
|
5
|
+
native: string;
|
|
6
|
+
server: string;
|
|
7
|
+
};
|
|
4
8
|
packageJSON: import("pkg-types").PackageJson;
|
|
5
9
|
state: State;
|
|
6
10
|
packageRootDir: string;
|
|
@@ -10,7 +14,6 @@ export declare function getOptionsFilled(options: VXRNConfig): Promise<{
|
|
|
10
14
|
host: string;
|
|
11
15
|
root: string;
|
|
12
16
|
port: number;
|
|
13
|
-
entryNative?: string | undefined;
|
|
14
17
|
webConfig?: import("vite").InlineConfig | undefined;
|
|
15
18
|
nativeConfig?: import("vite").InlineConfig | undefined;
|
|
16
19
|
flow?: import("@vxrn/vite-flow").Options | undefined;
|