vxrn 1.1.501 → 1.1.502
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/getAdditionalViteConfig.js +35 -0
- package/dist/config/getAdditionalViteConfig.js.map +6 -0
- package/dist/config/getAdditionalViteConfig.mjs +35 -0
- package/dist/config/getAdditionalViteConfig.mjs.map +1 -0
- package/dist/config/getAdditionalViteConfig.native.js +35 -0
- package/dist/config/getAdditionalViteConfig.native.js.map +1 -0
- package/dist/config/getBaseViteConfigOnly.js +76 -0
- package/dist/config/getBaseViteConfigOnly.js.map +6 -0
- package/dist/{utils/getBaseViteConfig.mjs → config/getBaseViteConfigOnly.mjs} +3 -55
- package/dist/config/getBaseViteConfigOnly.mjs.map +1 -0
- package/dist/config/getBaseViteConfigOnly.native.js +61 -0
- package/dist/config/getBaseViteConfigOnly.native.js.map +1 -0
- package/dist/config/getBaseViteConfigWithPlugins.js +12 -0
- package/dist/config/getBaseViteConfigWithPlugins.js.map +6 -0
- package/dist/config/getBaseViteConfigWithPlugins.mjs +10 -0
- package/dist/config/getBaseViteConfigWithPlugins.mjs.map +1 -0
- package/dist/config/getBaseViteConfigWithPlugins.native.js +10 -0
- package/dist/config/getBaseViteConfigWithPlugins.native.js.map +1 -0
- package/dist/config/getBaseVitePlugins.js +75 -0
- package/dist/config/getBaseVitePlugins.js.map +6 -0
- package/dist/config/getBaseVitePlugins.mjs +68 -0
- package/dist/config/getBaseVitePlugins.mjs.map +1 -0
- package/dist/config/getBaseVitePlugins.native.js +85 -0
- package/dist/config/getBaseVitePlugins.native.js.map +1 -0
- package/dist/config/getNonCliModeOnlyVitePlugins.js +11 -0
- package/dist/config/getNonCliModeOnlyVitePlugins.js.map +6 -0
- package/dist/config/getNonCliModeOnlyVitePlugins.mjs +8 -0
- package/dist/config/getNonCliModeOnlyVitePlugins.mjs.map +1 -0
- package/dist/config/getNonCliModeOnlyVitePlugins.native.js +6 -0
- package/dist/config/getNonCliModeOnlyVitePlugins.native.js.map +1 -0
- package/dist/{utils → config}/getOptimizeDeps.js.map +1 -1
- package/dist/config/getOptimizeDeps.mjs.map +1 -0
- package/dist/config/getOptimizeDeps.native.js.map +1 -0
- package/dist/{utils → config}/getOptionsFilled.js +3 -2
- package/dist/config/getOptionsFilled.js.map +6 -0
- package/dist/{utils → config}/getOptionsFilled.mjs +3 -2
- package/dist/config/getOptionsFilled.mjs.map +1 -0
- package/dist/{utils → config}/getOptionsFilled.native.js +3 -2
- package/dist/config/getOptionsFilled.native.js.map +1 -0
- package/dist/{utils/getReactNativeConfig.js → config/getReactNativeBuildConfig.js} +5 -6
- package/dist/config/getReactNativeBuildConfig.js.map +6 -0
- package/dist/{utils/getReactNativeConfig.mjs → config/getReactNativeBuildConfig.mjs} +5 -6
- package/dist/config/getReactNativeBuildConfig.mjs.map +1 -0
- package/dist/{utils/getReactNativeConfig.native.js → config/getReactNativeBuildConfig.native.js} +5 -6
- package/dist/config/getReactNativeBuildConfig.native.js.map +1 -0
- package/dist/config/getReactNativePlugins.js +33 -0
- package/dist/config/getReactNativePlugins.js.map +6 -0
- package/dist/config/getReactNativePlugins.mjs +21 -0
- package/dist/config/getReactNativePlugins.mjs.map +1 -0
- package/dist/config/getReactNativePlugins.native.js +23 -0
- package/dist/config/getReactNativePlugins.native.js.map +1 -0
- package/dist/{utils → config}/getServerOptionsFilled.js.map +1 -1
- package/dist/config/getServerOptionsFilled.mjs.map +1 -0
- package/dist/config/getServerOptionsFilled.native.js.map +1 -0
- package/dist/config/getViteServerConfig.js +35 -0
- package/dist/config/getViteServerConfig.js.map +6 -0
- package/dist/config/getViteServerConfig.mjs +40 -0
- package/dist/config/getViteServerConfig.mjs.map +1 -0
- package/dist/config/getViteServerConfig.native.js +41 -0
- package/dist/config/getViteServerConfig.native.js.map +1 -0
- package/dist/{utils → config}/mergeUserConfig.js +2 -2
- package/dist/{utils → config}/mergeUserConfig.js.map +1 -1
- package/dist/{utils → config}/mergeUserConfig.mjs +2 -2
- package/dist/config/mergeUserConfig.mjs.map +1 -0
- package/dist/{utils → config}/mergeUserConfig.native.js +2 -2
- package/dist/config/mergeUserConfig.native.js.map +1 -0
- package/dist/exports/build.js +10 -10
- package/dist/exports/build.js.map +1 -1
- package/dist/exports/build.mjs +10 -10
- package/dist/exports/build.mjs.map +1 -1
- package/dist/exports/build.native.js +10 -10
- package/dist/exports/build.native.js.map +1 -1
- package/dist/exports/clean.js +3 -2
- package/dist/exports/clean.js.map +1 -1
- package/dist/exports/clean.mjs +3 -2
- package/dist/exports/clean.mjs.map +1 -1
- package/dist/exports/clean.native.js +3 -2
- package/dist/exports/clean.native.js.map +1 -1
- package/dist/exports/dev.js +3 -6
- package/dist/exports/dev.js.map +1 -1
- package/dist/exports/dev.mjs +4 -7
- package/dist/exports/dev.mjs.map +1 -1
- package/dist/exports/dev.native.js +4 -7
- package/dist/exports/dev.native.js.map +1 -1
- package/dist/exports/patch.js +2 -1
- package/dist/exports/patch.js.map +1 -1
- package/dist/exports/patch.mjs +2 -1
- package/dist/exports/patch.mjs.map +1 -1
- package/dist/exports/patch.native.js +2 -1
- package/dist/exports/patch.native.js.map +1 -1
- package/dist/exports/prebuild.js +1 -1
- package/dist/exports/prebuild.mjs +1 -1
- package/dist/exports/prebuild.native.js +1 -1
- package/dist/exports/serve.js +1 -1
- package/dist/exports/serve.js.map +1 -1
- package/dist/exports/serve.mjs +1 -1
- package/dist/exports/serve.mjs.map +1 -1
- package/dist/exports/serve.native.js +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/dist/index.native.js +4 -3
- package/dist/index.native.js.map +1 -1
- package/dist/{utils/depPatches.js → patches/builtInDepPatches.js} +5 -5
- package/dist/patches/builtInDepPatches.js.map +6 -0
- package/dist/{utils/depPatches.mjs → patches/builtInDepPatches.mjs} +5 -5
- package/dist/patches/builtInDepPatches.mjs.map +1 -0
- package/dist/{utils/depPatches.native.js → patches/builtInDepPatches.native.js} +5 -5
- package/dist/patches/builtInDepPatches.native.js.map +1 -0
- package/dist/plugins/applyBuiltInPatchesPlugin.js +17 -0
- package/dist/plugins/applyBuiltInPatchesPlugin.js.map +6 -0
- package/dist/plugins/applyBuiltInPatchesPlugin.mjs +17 -0
- package/dist/plugins/applyBuiltInPatchesPlugin.mjs.map +1 -0
- package/dist/plugins/applyBuiltInPatchesPlugin.native.js +17 -0
- package/dist/plugins/applyBuiltInPatchesPlugin.native.js.map +1 -0
- package/dist/plugins/autoDepOptimizePlugin.js +2 -1
- package/dist/plugins/autoDepOptimizePlugin.js.map +1 -1
- package/dist/plugins/autoDepOptimizePlugin.mjs +2 -1
- package/dist/plugins/autoDepOptimizePlugin.mjs.map +1 -1
- package/dist/plugins/autoDepOptimizePlugin.native.js +2 -1
- package/dist/plugins/autoDepOptimizePlugin.native.js.map +1 -1
- package/dist/plugins/defaultDepOptimizePlugin.js +21 -0
- package/dist/plugins/defaultDepOptimizePlugin.js.map +6 -0
- package/dist/plugins/defaultDepOptimizePlugin.mjs +18 -0
- package/dist/plugins/defaultDepOptimizePlugin.mjs.map +1 -0
- package/dist/plugins/defaultDepOptimizePlugin.native.js +18 -0
- package/dist/plugins/defaultDepOptimizePlugin.native.js.map +1 -0
- package/dist/plugins/expoManifestRequestHandlerPlugin.js +10 -5
- package/dist/plugins/expoManifestRequestHandlerPlugin.js.map +1 -1
- package/dist/plugins/expoManifestRequestHandlerPlugin.mjs +7 -5
- package/dist/plugins/expoManifestRequestHandlerPlugin.mjs.map +1 -1
- package/dist/plugins/expoManifestRequestHandlerPlugin.native.js +7 -5
- package/dist/plugins/expoManifestRequestHandlerPlugin.native.js.map +1 -1
- package/dist/plugins/reactNativeDevAssetPlugin.js +6 -2
- package/dist/plugins/reactNativeDevAssetPlugin.js.map +1 -1
- package/dist/plugins/reactNativeDevAssetPlugin.mjs +6 -2
- package/dist/plugins/reactNativeDevAssetPlugin.mjs.map +1 -1
- package/dist/plugins/reactNativeDevAssetPlugin.native.js +7 -3
- package/dist/plugins/reactNativeDevAssetPlugin.native.js.map +1 -1
- package/dist/plugins/reactNativeDevServer.js +18 -7
- package/dist/plugins/reactNativeDevServer.js.map +1 -1
- package/dist/plugins/reactNativeDevServer.mjs +28 -7
- package/dist/plugins/reactNativeDevServer.mjs.map +1 -1
- package/dist/plugins/reactNativeDevServer.native.js +32 -10
- package/dist/plugins/reactNativeDevServer.native.js.map +1 -1
- package/dist/plugins/reactNativeHMRPlugin.js +8 -4
- package/dist/plugins/reactNativeHMRPlugin.js.map +1 -1
- package/dist/plugins/reactNativeHMRPlugin.mjs +10 -4
- package/dist/plugins/reactNativeHMRPlugin.mjs.map +1 -1
- package/dist/plugins/reactNativeHMRPlugin.native.js +10 -4
- package/dist/plugins/reactNativeHMRPlugin.native.js.map +1 -1
- package/dist/rn-commands/bundle/buildBundle.js +2 -2
- package/dist/rn-commands/bundle/buildBundle.js.map +1 -1
- package/dist/rn-commands/bundle/buildBundle.mjs +2 -2
- package/dist/rn-commands/bundle/buildBundle.mjs.map +1 -1
- package/dist/rn-commands/bundle/buildBundle.native.js +2 -2
- package/dist/rn-commands/bundle/buildBundle.native.js.map +1 -1
- package/dist/utils/expoRun.js +1 -1
- package/dist/utils/expoRun.mjs +1 -1
- package/dist/utils/expoRun.native.js +1 -1
- package/dist/utils/getCacheDir.js +8 -0
- package/dist/utils/getCacheDir.js.map +6 -0
- package/dist/utils/getCacheDir.mjs +6 -0
- package/dist/utils/getCacheDir.mjs.map +1 -0
- package/dist/utils/getCacheDir.native.js +6 -0
- package/dist/utils/getCacheDir.native.js.map +1 -0
- package/dist/utils/getReactNativeBundle.js +4 -3
- package/dist/utils/getReactNativeBundle.js.map +1 -1
- package/dist/utils/getReactNativeBundle.mjs +4 -3
- package/dist/utils/getReactNativeBundle.mjs.map +1 -1
- package/dist/utils/getReactNativeBundle.native.js +4 -3
- package/dist/utils/getReactNativeBundle.native.js.map +1 -1
- package/dist/utils/patches.js +3 -3
- package/dist/utils/patches.js.map +1 -1
- package/dist/utils/patches.mjs +3 -3
- package/dist/utils/patches.mjs.map +1 -1
- package/dist/utils/patches.native.js +3 -3
- package/dist/utils/patches.native.js.map +1 -1
- package/dist/utils/scanDepsToOptimize.js +6 -3
- package/dist/utils/scanDepsToOptimize.js.map +1 -1
- package/dist/utils/scanDepsToOptimize.mjs +29 -24
- package/dist/utils/scanDepsToOptimize.mjs.map +1 -1
- package/dist/utils/scanDepsToOptimize.native.js +12 -7
- package/dist/utils/scanDepsToOptimize.native.js.map +1 -1
- package/dist/vxrn-vite-plugin.js +47 -0
- package/dist/vxrn-vite-plugin.js.map +6 -0
- package/dist/vxrn-vite-plugin.mjs +40 -0
- package/dist/vxrn-vite-plugin.mjs.map +1 -0
- package/dist/vxrn-vite-plugin.native.js +41 -0
- package/dist/vxrn-vite-plugin.native.js.map +1 -0
- package/dist/worker.js.map +1 -1
- package/dist/worker.mjs.map +1 -1
- package/dist/worker.native.js.map +1 -1
- package/package.json +17 -12
- package/src/config/getAdditionalViteConfig.ts +44 -0
- package/src/config/getBaseViteConfigOnly.ts +110 -0
- package/src/config/getBaseViteConfigWithPlugins.ts +16 -0
- package/src/config/getBaseVitePlugins.ts +100 -0
- package/src/config/getNonCliModeOnlyVitePlugins.ts +17 -0
- package/src/{utils → config}/getOptionsFilled.ts +31 -2
- package/src/{utils/getReactNativeConfig.ts → config/getReactNativeBuildConfig.ts} +16 -5
- package/src/config/getReactNativePlugins.ts +52 -0
- package/src/config/getViteServerConfig.ts +64 -0
- package/src/{utils → config}/mergeUserConfig.ts +2 -2
- package/src/exports/build.ts +13 -8
- package/src/exports/clean.ts +3 -2
- package/src/exports/dev.ts +4 -6
- package/src/exports/patch.ts +2 -1
- package/src/exports/prebuild.ts +1 -1
- package/src/exports/serve.ts +1 -1
- package/src/index.ts +4 -3
- package/src/{utils/depPatches.ts → patches/builtInDepPatches.ts} +3 -3
- package/src/plugins/applyBuiltInPatchesPlugin.ts +16 -0
- package/src/plugins/autoDepOptimizePlugin.ts +2 -1
- package/src/plugins/defaultDepOptimizePlugin.ts +41 -0
- package/src/plugins/expoManifestRequestHandlerPlugin.ts +16 -7
- package/src/plugins/reactNativeDevAssetPlugin.ts +9 -3
- package/src/plugins/reactNativeDevServer.ts +27 -8
- package/src/plugins/reactNativeHMRPlugin.ts +14 -6
- package/src/rn-commands/bundle/buildBundle.ts +2 -1
- package/src/utils/expoRun.ts +1 -1
- package/src/utils/getCacheDir.ts +5 -0
- package/src/utils/getReactNativeBundle.ts +8 -5
- package/src/utils/getServerEntry.ts +1 -1
- package/src/utils/patches.ts +5 -5
- package/src/utils/scanDepsToOptimize.ts +7 -0
- package/src/vxrn-vite-plugin.ts +74 -0
- package/src/worker.ts +4 -2
- package/types/config/getAdditionalViteConfig.d.ts +6 -0
- package/types/config/getAdditionalViteConfig.d.ts.map +1 -0
- package/types/config/getBaseViteConfigOnly.d.ts +16 -0
- package/types/config/getBaseViteConfigOnly.d.ts.map +1 -0
- package/types/config/getBaseViteConfigWithPlugins.d.ts +8 -0
- package/types/config/getBaseViteConfigWithPlugins.d.ts.map +1 -0
- package/types/config/getBaseVitePlugins.d.ts +3 -0
- package/types/config/getBaseVitePlugins.d.ts.map +1 -0
- package/types/config/getNonCliModeOnlyVitePlugins.d.ts +12 -0
- package/types/config/getNonCliModeOnlyVitePlugins.d.ts.map +1 -0
- package/types/config/getOptimizeDeps.d.ts.map +1 -0
- package/types/{utils → config}/getOptionsFilled.d.ts +28 -0
- package/types/config/getOptionsFilled.d.ts.map +1 -0
- package/types/{utils/getReactNativeConfig.d.ts → config/getReactNativeBuildConfig.d.ts} +14 -2
- package/types/config/getReactNativeBuildConfig.d.ts.map +1 -0
- package/types/config/getReactNativePlugins.d.ts +10 -0
- package/types/config/getReactNativePlugins.d.ts.map +1 -0
- package/types/config/getServerOptionsFilled.d.ts.map +1 -0
- package/types/{utils → config}/getViteServerConfig.d.ts +4 -0
- package/types/config/getViteServerConfig.d.ts.map +1 -0
- package/types/config/mergeUserConfig.d.ts.map +1 -0
- package/types/exports/build.d.ts.map +1 -1
- package/types/exports/clean.d.ts.map +1 -1
- package/types/exports/dev.d.ts.map +1 -1
- package/types/exports/patch.d.ts.map +1 -1
- package/types/index.d.ts +4 -3
- package/types/index.d.ts.map +1 -1
- package/types/patches/builtInDepPatches.d.ts +3 -0
- package/types/patches/builtInDepPatches.d.ts.map +1 -0
- package/types/plugins/applyBuiltInPatchesPlugin.d.ts +3 -0
- package/types/plugins/applyBuiltInPatchesPlugin.d.ts.map +1 -0
- package/types/plugins/autoDepOptimizePlugin.d.ts.map +1 -1
- package/types/plugins/defaultDepOptimizePlugin.d.ts +9 -0
- package/types/plugins/defaultDepOptimizePlugin.d.ts.map +1 -0
- package/types/plugins/expoManifestRequestHandlerPlugin.d.ts +1 -5
- package/types/plugins/expoManifestRequestHandlerPlugin.d.ts.map +1 -1
- package/types/plugins/reactNativeDevAssetPlugin.d.ts +0 -1
- package/types/plugins/reactNativeDevAssetPlugin.d.ts.map +1 -1
- package/types/plugins/reactNativeDevServer.d.ts +2 -2
- package/types/plugins/reactNativeDevServer.d.ts.map +1 -1
- package/types/plugins/reactNativeHMRPlugin.d.ts +4 -2
- package/types/plugins/reactNativeHMRPlugin.d.ts.map +1 -1
- package/types/rn-commands/bundle/buildBundle.d.ts.map +1 -1
- package/types/utils/getCacheDir.d.ts +2 -0
- package/types/utils/getCacheDir.d.ts.map +1 -0
- package/types/utils/getReactNativeBundle.d.ts +3 -2
- package/types/utils/getReactNativeBundle.d.ts.map +1 -1
- package/types/utils/getServerEntry.d.ts +1 -1
- package/types/utils/getServerEntry.d.ts.map +1 -1
- package/types/utils/patches.d.ts +2 -2
- package/types/utils/patches.d.ts.map +1 -1
- package/types/utils/scanDepsToOptimize.d.ts.map +1 -1
- package/types/vxrn-vite-plugin.d.ts +21 -0
- package/types/vxrn-vite-plugin.d.ts.map +1 -0
- package/types/worker.d.ts +3 -2
- package/types/worker.d.ts.map +1 -1
- package/dist/utils/depPatches.js.map +0 -6
- package/dist/utils/depPatches.mjs.map +0 -1
- package/dist/utils/depPatches.native.js.map +0 -1
- package/dist/utils/getBaseViteConfig.js +0 -132
- package/dist/utils/getBaseViteConfig.js.map +0 -6
- package/dist/utils/getBaseViteConfig.mjs.map +0 -1
- package/dist/utils/getBaseViteConfig.native.js +0 -129
- package/dist/utils/getBaseViteConfig.native.js.map +0 -1
- package/dist/utils/getOptimizeDeps.mjs.map +0 -1
- package/dist/utils/getOptimizeDeps.native.js.map +0 -1
- package/dist/utils/getOptionsFilled.js.map +0 -6
- package/dist/utils/getOptionsFilled.mjs.map +0 -1
- package/dist/utils/getOptionsFilled.native.js.map +0 -1
- package/dist/utils/getReactNativeConfig.js.map +0 -6
- package/dist/utils/getReactNativeConfig.mjs.map +0 -1
- package/dist/utils/getReactNativeConfig.native.js.map +0 -1
- package/dist/utils/getServerOptionsFilled.mjs.map +0 -1
- package/dist/utils/getServerOptionsFilled.native.js.map +0 -1
- package/dist/utils/getViteServerConfig.js +0 -90
- package/dist/utils/getViteServerConfig.js.map +0 -6
- package/dist/utils/getViteServerConfig.mjs +0 -88
- package/dist/utils/getViteServerConfig.mjs.map +0 -1
- package/dist/utils/getViteServerConfig.native.js +0 -90
- package/dist/utils/getViteServerConfig.native.js.map +0 -1
- package/dist/utils/mergeUserConfig.mjs.map +0 -1
- package/dist/utils/mergeUserConfig.native.js.map +0 -1
- package/src/utils/getBaseViteConfig.ts +0 -179
- package/src/utils/getViteServerConfig.ts +0 -127
- package/types/utils/depPatches.d.ts +0 -3
- package/types/utils/depPatches.d.ts.map +0 -1
- package/types/utils/getBaseViteConfig.d.ts +0 -5
- package/types/utils/getBaseViteConfig.d.ts.map +0 -1
- package/types/utils/getOptimizeDeps.d.ts.map +0 -1
- package/types/utils/getOptionsFilled.d.ts.map +0 -1
- package/types/utils/getReactNativeConfig.d.ts.map +0 -1
- package/types/utils/getServerOptionsFilled.d.ts.map +0 -1
- package/types/utils/getViteServerConfig.d.ts.map +0 -1
- package/types/utils/mergeUserConfig.d.ts.map +0 -1
- /package/dist/{utils → config}/getOptimizeDeps.js +0 -0
- /package/dist/{utils → config}/getOptimizeDeps.mjs +0 -0
- /package/dist/{utils → config}/getOptimizeDeps.native.js +0 -0
- /package/dist/{utils → config}/getServerOptionsFilled.js +0 -0
- /package/dist/{utils → config}/getServerOptionsFilled.mjs +0 -0
- /package/dist/{utils → config}/getServerOptionsFilled.native.js +0 -0
- /package/src/{utils → config}/getOptimizeDeps.ts +0 -0
- /package/src/{utils → config}/getServerOptionsFilled.ts +0 -0
- /package/types/{utils → config}/getOptimizeDeps.d.ts +0 -0
- /package/types/{utils → config}/getServerOptionsFilled.d.ts +0 -0
- /package/types/{utils → config}/mergeUserConfig.d.ts +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { mergeConfig } from "vite";
|
|
2
|
+
import { getBaseViteConfig } from "./config/getBaseViteConfigOnly.native.js";
|
|
3
|
+
import { getAdditionalViteConfig } from "./config/getAdditionalViteConfig.native.js";
|
|
4
|
+
import { getBaseVitePlugins } from "./config/getBaseVitePlugins.native.js";
|
|
5
|
+
import { getNonCliModeOnlyVitePlugins } from "./config/getNonCliModeOnlyVitePlugins.native.js";
|
|
6
|
+
import { getReactNativePlugins } from "./config/getReactNativePlugins.native.js";
|
|
7
|
+
function vxrn(options) {
|
|
8
|
+
return [{
|
|
9
|
+
name: "vxrn-config",
|
|
10
|
+
config: async function (config, param) {
|
|
11
|
+
var {
|
|
12
|
+
mode: modeIn
|
|
13
|
+
} = param,
|
|
14
|
+
mode = function () {
|
|
15
|
+
switch (modeIn) {
|
|
16
|
+
case "development":
|
|
17
|
+
case "dev":
|
|
18
|
+
return "development";
|
|
19
|
+
case "production":
|
|
20
|
+
case "prod":
|
|
21
|
+
return "production";
|
|
22
|
+
default:
|
|
23
|
+
return console.warn(`[vxrn-config] Unrecognized mode "${modeIn}". Defaulting to "development".`), "development";
|
|
24
|
+
}
|
|
25
|
+
}(),
|
|
26
|
+
root = config.root;
|
|
27
|
+
root || (root = process.cwd(), console.warn(`[vxrn-config] \`config.root\` is empty, using current working directory (process.cwd()): ${root}`));
|
|
28
|
+
var baseConfig = await getBaseViteConfig({
|
|
29
|
+
root,
|
|
30
|
+
mode
|
|
31
|
+
}),
|
|
32
|
+
additionalConfig = getAdditionalViteConfig();
|
|
33
|
+
return mergeConfig(baseConfig, additionalConfig);
|
|
34
|
+
}
|
|
35
|
+
}, ...getBaseVitePlugins(), ...getNonCliModeOnlyVitePlugins(), ...getReactNativePlugins({}, {
|
|
36
|
+
metro: options?.metro || null
|
|
37
|
+
})];
|
|
38
|
+
}
|
|
39
|
+
var vxrn_vite_plugin_default = vxrn;
|
|
40
|
+
export { vxrn_vite_plugin_default as default, vxrn };
|
|
41
|
+
//# sourceMappingURL=vxrn-vite-plugin.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["mergeConfig","getBaseViteConfig","getAdditionalViteConfig","getBaseVitePlugins","getNonCliModeOnlyVitePlugins","getReactNativePlugins","vxrn","options","name","config","param","mode","modeIn","console","warn","root","process","cwd","baseConfig","additionalConfig","metro","vxrn_vite_plugin_default","default"],"sources":["../src/vxrn-vite-plugin.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,WAAA,QAAsC;AAC/C,SAASC,iBAAA,QAAyB;AAClC,SAASC,uBAAA,QAA+B;AACxC,SAASC,kBAAA,QAA0B;AACnC,SAASC,4BAAA,QAAoC;AAC7C,SAASC,qBAAA,QAA6B;AAuB/B,SAASC,KAAKC,OAAA,EAA2C;EAC9D,OAAO,CACL;IACEC,IAAA,EAAM;IACNC,MAAA,EAAQ,eAAAA,CAAeA,MAAE,EAAMC,KAAA,EAAO;MACpC;UAAMC,IAAA,EAAAC;QAAQ,CAAM,GAAAF,KAAA;QAAAC,IAAA;UAClB,QAAQC,MAAA;YACN,KAAK;YACL,KAAK;cACH,OAAO;YACT,KAAK;YACL,KAAK;cACH,OAAO;YACT;cACE,OAAAC,OAAA,CAAQC,IAAA,qCAAAF,MAAA;UAAA;QACoC;QAAAG,IAErC,GAAAN,MAAA,CAAAM,IAAA;MAAAA,IACX,KAAAA,IAAA,GAAAC,OAAA,CAAAC,GAAA,IAAAJ,OAAA,CAAAC,IAAA,6FAAAC,IAAA;MACF,IAAGG,UAAA,SAAAjB,iBAAA;UAEHc,IAAI;UAECJ;QAEK,EACN;QAAAQ,gBAAA,GAAAjB,uBAAA;MACF,OAAAF,WAAA,CAAAkB,UAAA,EAAAC,gBAAA;IAGF;EAA2C,GACzC,GAAAhB,kBACA,OAAAC,4BAGuB,IACzB,GAAAC,qBAAmB;IACrBe,KAAA,EAAAb,OAAA,EAAAa,KAAA;EACF;AACsB;AACU,IAChCC,wBAAG,GAAuBf,IAAK;AAA+B,SAElEe,wBAAA,IAAAC,OAAA,EAEAhB,IAAO","ignoreList":[]}
|
package/dist/worker.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/worker.ts"],
|
|
4
|
-
"mappings": "AAAA,SAAS,YAAY,cAAc,cAAc;AAEjD,SAAS,eAAe;AACxB,SAAS,4BAA4B;AACrC,SAAS,mBAAmB;AAC5B;AAAA,EAEE;AAAA,EACA;AAAA,OACK;
|
|
4
|
+
"mappings": "AAAA,SAAS,YAAY,cAAc,cAAc;AAEjD,SAAS,eAAe;AACxB,SAAS,4BAA4B;AACrC,SAAS,mBAAmB;AAC5B;AAAA,EAEE;AAAA,EACA;AAAA,OACK;AAaP,MAAM,aAAa,YAAY,aAAa;AAE5C,IAAI;AAEG,SAAS,YACd,MACA,KAC6B;AAC7B,iBAAQ,KAAK,OAAO,IAAI,GAExB,WAAW,IAAI,OAAO,YAAY;AAAA,IAChC,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV,CAAC,GAEM,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,WAAO,YAAY,EAAE,MAAM,KAAK,iBAAiB,kBAAkB,EAAE,CAAC,GAEtE,OAAO,GAAG,WAAW,CAAC,YAAiB;AACrC,MAAI,QAAQ,SACV,QAAQ,QAAQ,MAAM,IACb,QAAQ,SACjB,OAAO,IAAI,MAAM,QAAQ,KAAK,CAAC;AAAA,IAEnC,CAAC,GAED,OAAO,GAAG,SAAS,CAAC,UAAU;AAC5B,aAAO,KAAK;AAAA,IACd,CAAC,GAED,OAAO,GAAG,QAAQ,CAAC,SAAS;AAC1B,MAAI,SAAS,KACX,OAAO,IAAI,MAAM,iCAAiC,IAAI,EAAE,CAAC;AAAA,IAE7D,CAAC;AAAA,EACH,CAAC;AACH;AAEA,QAAQ,GAAG,QAAQ,MAAM;AACvB,UAAQ,UAAU;AACpB,CAAC;AAEG,CAAC,gBAAgB,cACnB,WAAW,GAAG,WAAW,OAAO,YAAgE;AAK9F,UAJI,QAAQ,mBACV,kBAAkB,QAAQ,eAAe,GAGnC,QAAQ,MAAM;AAAA,IACpB,KAAK,uBAAuB;AAC1B,YAAM,EAAE,SAAS,SAAS,IAAI,QAAQ;AAEtC,UAAI;AACF,gBAAQ,aAAa;AACrB,cAAM,SAAS,MAAM,qBAAqB,SAAS,UAAU,EAAE,MAAM,MAAM,CAAC;AAC5E,mBAAY,YAAY,EAAE,QAAQ,OAAO,CAAC;AAAA,MAC5C,SAAS,OAAY;AACnB,mBAAY,YAAY,EAAE,OAAO,MAAM,QAAQ,CAAC;AAAA,MAClD;AAEA;AAAA,IACF;AAAA,EACF;AACF,CAAC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/worker.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["parentPort","isMainThread","Worker","loadEnv","getReactNativeBundle","resolvePath","getResolvedConfig","setResolvedConfig","workerPath","worker","runOnWorker","name","arg","console","info","stdout","stderr","Promise","resolve","reject","postMessage","_resolvedConfig","on","message","result","error","Error","code","process","terminate","options","platform","bundle","mode"],"sources":["../src/worker.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,UAAA,EAAYC,YAAA,EAAcC,MAAA,QAAc;AAEjD,SAASC,OAAA,QAAe;AACxB,SAASC,oBAAA,QAA4B;AACrC,SAASC,WAAA,QAAmB;AAC5B,SAEEC,iBAAA,EACAC,iBAAA,QACK;
|
|
1
|
+
{"version":3,"names":["parentPort","isMainThread","Worker","loadEnv","getReactNativeBundle","resolvePath","getResolvedConfig","setResolvedConfig","workerPath","worker","runOnWorker","name","arg","console","info","stdout","stderr","Promise","resolve","reject","postMessage","_resolvedConfig","on","message","result","error","Error","code","process","terminate","options","platform","bundle","mode"],"sources":["../src/worker.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,UAAA,EAAYC,YAAA,EAAcC,MAAA,QAAc;AAEjD,SAASC,OAAA,QAAe;AACxB,SAASC,oBAAA,QAA4B;AACrC,SAASC,WAAA,QAAmB;AAC5B,SAEEC,iBAAA,EACAC,iBAAA,QACK;AAaP,MAAMC,UAAA,GAAaH,WAAA,CAAY,aAAa;AAE5C,IAAII,MAAA;AAEG,SAASC,YACdC,IAAA,EACAC,GAAA,EAC6B;EAC7B,OAAAC,OAAA,CAAQC,IAAA,CAAK,OAAOH,IAAI,GAExBF,MAAA,KAAW,IAAIP,MAAA,CAAOM,UAAA,EAAY;IAChCO,MAAA,EAAQ;IACRC,MAAA,EAAQ;EACV,CAAC,GAEM,IAAIC,OAAA,CAAQ,CAACC,OAAA,EAASC,MAAA,KAAW;IACtCV,MAAA,CAAOW,WAAA,CAAY;MAAET,IAAA;MAAMC,GAAA;MAAKS,eAAA,EAAiBf,iBAAA,CAAkB;IAAE,CAAC,GAEtEG,MAAA,CAAOa,EAAA,CAAG,WAAYC,OAAA,IAAiB;MACjCA,OAAA,CAAQC,MAAA,GACVN,OAAA,CAAQK,OAAA,CAAQC,MAAM,IACbD,OAAA,CAAQE,KAAA,IACjBN,MAAA,CAAO,IAAIO,KAAA,CAAMH,OAAA,CAAQE,KAAK,CAAC;IAEnC,CAAC,GAEDhB,MAAA,CAAOa,EAAA,CAAG,SAAUG,KAAA,IAAU;MAC5BN,MAAA,CAAOM,KAAK;IACd,CAAC,GAEDhB,MAAA,CAAOa,EAAA,CAAG,QAASK,IAAA,IAAS;MACtBA,IAAA,KAAS,KACXR,MAAA,CAAO,IAAIO,KAAA,CAAM,iCAAiCC,IAAI,EAAE,CAAC;IAE7D,CAAC;EACH,CAAC;AACH;AAEAC,OAAA,CAAQN,EAAA,CAAG,QAAQ,MAAM;EACvBb,MAAA,EAAQoB,SAAA,CAAU;AACpB,CAAC;AAEG,CAAC5B,YAAA,IAAgBD,UAAA,IACnBA,UAAA,CAAWsB,EAAA,CAAG,WAAW,MAAOC,OAAA,IAAgE;EAK9F,QAJIA,OAAA,CAAQF,eAAA,IACVd,iBAAA,CAAkBgB,OAAA,CAAQF,eAAe,GAGnCE,OAAA,CAAQZ,IAAA;IACd,KAAK;MAAuB;QAC1B,MAAM;UAAEmB,OAAA;UAASC;QAAS,IAAIR,OAAA,CAAQX,GAAA;QAEtC,IAAI;UACFT,OAAA,CAAQ,aAAa;UACrB,MAAM6B,MAAA,GAAS,MAAM5B,oBAAA,CAAqB0B,OAAA,EAASC,QAAA,EAAU;YAAEE,IAAA,EAAM;UAAM,CAAC;UAC5EjC,UAAA,CAAYoB,WAAA,CAAY;YAAEI,MAAA,EAAQQ;UAAO,CAAC;QAC5C,SAASP,KAAA,EAAY;UACnBzB,UAAA,CAAYoB,WAAA,CAAY;YAAEK,KAAA,EAAOA,KAAA,CAAMF;UAAQ,CAAC;QAClD;QAEA;MACF;EACF;AACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["parentPort","isMainThread","Worker","loadEnv","getReactNativeBundle","resolvePath","getResolvedConfig","setResolvedConfig","workerPath","worker","runOnWorker","name","arg","console","info","stdout","stderr","Promise","resolve","reject","postMessage","_resolvedConfig","on","message","result","error","Error","code","process","terminate","options","platform","bundle","mode"],"sources":["../src/worker.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,UAAA,EAAYC,YAAA,EAAcC,MAAA,QAAc;AAEjD,SAASC,OAAA,QAAe;AACxB,SAASC,oBAAA,QAA4B;AACrC,SAASC,WAAA,QAAmB;AAC5B,SAAAC,iBAAA,EAAAC,iBAAA;AAAA,IAEEC,UAAA,GAAAH,WAAA;EAAAI,MAAA;AAAA,SACAC,YAAAC,IAAA,EAAAC,GAAA;EAAA,OACKC,OAAA,CAAAC,IAAA,QAAAH,IAAA,GAAAF,MAAA,KAAAA,MAAA,OAAAP,MAAA,CAAAM,UAAA;
|
|
1
|
+
{"version":3,"names":["parentPort","isMainThread","Worker","loadEnv","getReactNativeBundle","resolvePath","getResolvedConfig","setResolvedConfig","workerPath","worker","runOnWorker","name","arg","console","info","stdout","stderr","Promise","resolve","reject","postMessage","_resolvedConfig","on","message","result","error","Error","code","process","terminate","options","platform","bundle","mode"],"sources":["../src/worker.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,UAAA,EAAYC,YAAA,EAAcC,MAAA,QAAc;AAEjD,SAASC,OAAA,QAAe;AACxB,SAASC,oBAAA,QAA4B;AACrC,SAASC,WAAA,QAAmB;AAC5B,SAAAC,iBAAA,EAAAC,iBAAA;AAAA,IAEEC,UAAA,GAAAH,WAAA;EAAAI,MAAA;AAAA,SACAC,YAAAC,IAAA,EAAAC,GAAA;EAAA,OACKC,OAAA,CAAAC,IAAA,QAAAH,IAAA,GAAAF,MAAA,KAAAA,MAAA,OAAAP,MAAA,CAAAM,UAAA;IAaPO,MAAM;IAEFC,MAAA;EAEG,SAASC,OAAA,WAEdC,OAC6B,EAAAC,MAAA;IAC7BV,MAAA,CAAAW,WAAa;MAGXT,IAAA;MACAC,GAAA;MAGKS,eAAa,EAAAf,iBAAoB;IACtC,IAAAG,MAAO,CAAAa,EAAA,UAAc,YAAWC,OAAA;MAG1BA,OAAA,CAAQC,MAAA,GACVN,OAAA,CAAQK,OAAA,CAAQC,MAAM,IACbD,OAAA,CAAQE,KAAA,IACjBN,MAAA,CAAO,IAAIO,KAAA,CAAMH,OAAA,CAAQE,KAAK,CAAC;IAEnC,CAAC,GAEDhB,MAAA,CAAOa,EAAA,CAAG,SAAS,UAACG,KAAU;MAC5BN,MAAA,CAAOM,KAAK;IACd,CAAC,GAEDhB,MAAA,CAAOa,EAAA,CAAG,QAAQ,UAACK,IAAS;MACtBA,IAAA,KAAS,KACXR,MAAA,CAAO,IAAIO,KAAA,CAAM,iCAAiCC,IAAI,EAAE,CAAC;IAE7D,CAAC;EACH,CAAC;AACH;AAEAC,OAAA,CAAQN,EAAA,CAAG,QAAQ,YAAM;EACvBb,MAAA,EAAQoB,SAAA,CAAU;AACpB,CAAC;AAEG,CAAC5B,YAAA,IAAgBD,UAAA,IACnBA,UAAA,CAAWsB,EAAA,CAAG,WAAW,gBAAOC,OAAgE;EAK9F,QAJIA,OAAA,CAAQF,eAAA,IACVd,iBAAA,CAAkBgB,OAAA,CAAQF,eAAe,GAGnCE,OAAA,CAAQZ,IAAA;IACd,KAAK;MAAuB;QAC1B;UAAMmB,OAAE;UAAAC;QAAS,IAASR,OAAI,CAAAX,GAAQ;QAEtC,IAAI;UACFT,OAAA,CAAQ,aAAa;UACrB,IAAA6B,MAAM,SAAS5B,oBAAM,CAAA0B,OAAqB,EAAAC,QAAS;YACnDE,IAAA;UACF;UACEjC,UAAA,CAAYoB,WAAA,CAAY;YAC1BI,MAAA,EAAAQ;UAEA;QACF,SAAAP,KAAA;UACFzB,UAAA,CAAAoB,WAAA;YACDK,KAAA,EAAAA,KAAA,CAAAF","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxrn",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.502",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
"./loadEnv": {
|
|
33
33
|
"types": "./types/exports/loadEnv.d.ts",
|
|
34
34
|
"default": "./dist/exports/loadEnv.mjs"
|
|
35
|
+
},
|
|
36
|
+
"./vite-plugin": {
|
|
37
|
+
"types": "./types/vxrn-vite-plugin.d.ts",
|
|
38
|
+
"default": "./dist/vxrn-vite-plugin.mjs"
|
|
35
39
|
}
|
|
36
40
|
},
|
|
37
41
|
"module": "dist",
|
|
@@ -61,16 +65,17 @@
|
|
|
61
65
|
"@hono/node-server": "^1.13.7",
|
|
62
66
|
"@react-native/dev-middleware": "^0.76.5",
|
|
63
67
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
64
|
-
"@vxrn/compiler": "1.1.
|
|
65
|
-
"@vxrn/debug": "1.1.
|
|
66
|
-
"@vxrn/query-string": "1.1.
|
|
67
|
-
"@vxrn/react-native-prebuilt": "1.1.
|
|
68
|
-
"@vxrn/resolve": "1.1.
|
|
69
|
-
"@vxrn/safe-area": "1.1.
|
|
70
|
-
"@vxrn/url-parse": "1.1.
|
|
71
|
-
"@vxrn/utils": "1.1.
|
|
72
|
-
"@vxrn/vendor": "1.1.
|
|
73
|
-
"@vxrn/vite-flow": "1.1.
|
|
68
|
+
"@vxrn/compiler": "1.1.502",
|
|
69
|
+
"@vxrn/debug": "1.1.502",
|
|
70
|
+
"@vxrn/query-string": "1.1.502",
|
|
71
|
+
"@vxrn/react-native-prebuilt": "1.1.502",
|
|
72
|
+
"@vxrn/resolve": "1.1.502",
|
|
73
|
+
"@vxrn/safe-area": "1.1.502",
|
|
74
|
+
"@vxrn/url-parse": "1.1.502",
|
|
75
|
+
"@vxrn/utils": "1.1.502",
|
|
76
|
+
"@vxrn/vendor": "1.1.502",
|
|
77
|
+
"@vxrn/vite-flow": "1.1.502",
|
|
78
|
+
"@vxrn/vite-plugin-metro": "1.1.502",
|
|
74
79
|
"citty": "^0.1.6",
|
|
75
80
|
"env-editor": "^1.1.0",
|
|
76
81
|
"es-module-lexer": "^1.3.0",
|
|
@@ -94,7 +99,7 @@
|
|
|
94
99
|
"devDependencies": {
|
|
95
100
|
"@biomejs/biome": "1.9.4",
|
|
96
101
|
"@react-native-community/cli": "19.0.0",
|
|
97
|
-
"@tamagui/build": "^1.
|
|
102
|
+
"@tamagui/build": "^1.129.5",
|
|
98
103
|
"@types/find-node-modules": "^2.1.2",
|
|
99
104
|
"@types/node": "^22.1.0",
|
|
100
105
|
"@types/qrcode-terminal": "^0",
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { InlineConfig, UserConfig } from 'vite'
|
|
2
|
+
|
|
3
|
+
import { getOptimizeDeps } from './getOptimizeDeps'
|
|
4
|
+
|
|
5
|
+
import { webExtensions } from '../constants'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* These configs are originally in `getViteServerConfig`. Maybe we should organize and move each of them into other more appropriate places.
|
|
9
|
+
*/
|
|
10
|
+
export function getAdditionalViteConfig(): Omit<InlineConfig, 'plugins'> {
|
|
11
|
+
const { optimizeDeps } = getOptimizeDeps('serve')
|
|
12
|
+
|
|
13
|
+
// TODO: can we move most of this into `one` plugin:
|
|
14
|
+
return {
|
|
15
|
+
appType: 'custom',
|
|
16
|
+
clearScreen: false,
|
|
17
|
+
publicDir: 'public',
|
|
18
|
+
|
|
19
|
+
ssr: {
|
|
20
|
+
optimizeDeps,
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
environments: {
|
|
24
|
+
client: {
|
|
25
|
+
optimizeDeps: {
|
|
26
|
+
include: ['react-native-screens', '@rocicorp/zero'],
|
|
27
|
+
esbuildOptions: {
|
|
28
|
+
resolveExtensions: webExtensions,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
optimizeDeps: {
|
|
35
|
+
esbuildOptions: {
|
|
36
|
+
target: 'esnext',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
server: {
|
|
41
|
+
cors: true,
|
|
42
|
+
},
|
|
43
|
+
} satisfies Omit<UserConfig, 'plugins'>
|
|
44
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { InlineConfig } from 'vite'
|
|
2
|
+
import { resolvePath } from '@vxrn/resolve'
|
|
3
|
+
import FSExtra from 'fs-extra'
|
|
4
|
+
import { join } from 'node:path'
|
|
5
|
+
import type { VXRNOptionsFilled } from './getOptionsFilled'
|
|
6
|
+
|
|
7
|
+
// essentially base web config not base everything
|
|
8
|
+
|
|
9
|
+
export const dedupe = [
|
|
10
|
+
'one',
|
|
11
|
+
'@vxrn/safe-area',
|
|
12
|
+
'react',
|
|
13
|
+
'react-dom',
|
|
14
|
+
'react-dom/client',
|
|
15
|
+
'react-native-web',
|
|
16
|
+
'@react-navigation/core',
|
|
17
|
+
'@react-navigation/elements',
|
|
18
|
+
'@tamagui/core',
|
|
19
|
+
'@tamagui/web',
|
|
20
|
+
'@tamagui/react-native-web',
|
|
21
|
+
'tamagui',
|
|
22
|
+
'react-native-reanimated',
|
|
23
|
+
'expo-modules-core',
|
|
24
|
+
'escape-string-regexp',
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Returns fundamental Vite configs.
|
|
29
|
+
*
|
|
30
|
+
* Here we returns only configs, without plugins. Basic plugins are defined in
|
|
31
|
+
* `getBaseVitePlugins`. By separating plugins and configs, we try to make
|
|
32
|
+
* things more composable and avoid plugins to be nested.
|
|
33
|
+
*
|
|
34
|
+
* The file is named "getBaseViteConfig**Only**" because there's originally
|
|
35
|
+
* a `getBaseViteConfig` that returns both plugins and configs. The "Only"
|
|
36
|
+
* is added to prevent misuse. We can remove it later when things are settled.
|
|
37
|
+
*/
|
|
38
|
+
export async function getBaseViteConfig(
|
|
39
|
+
config: Pick<VXRNOptionsFilled, 'root' | 'mode'>
|
|
40
|
+
): Promise<Omit<InlineConfig, 'plugins'>> {
|
|
41
|
+
const { root, mode } = config
|
|
42
|
+
|
|
43
|
+
const postCSSPaths = [
|
|
44
|
+
join(root, 'postcss.config.js'),
|
|
45
|
+
join(root, 'postcss.config.ts'),
|
|
46
|
+
join(root, 'postcss.config.json'),
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
const postCSSConfigPath = (
|
|
50
|
+
await Promise.all(
|
|
51
|
+
postCSSPaths.map(async (x) => {
|
|
52
|
+
if (await FSExtra.pathExists(x)) {
|
|
53
|
+
return x
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
)
|
|
57
|
+
).find((x) => typeof x === 'string')
|
|
58
|
+
|
|
59
|
+
const reactNativePackageJsonPath = resolvePath('react-native/package.json', root)
|
|
60
|
+
const { version } = await FSExtra.readJSON(reactNativePackageJsonPath)
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
mode,
|
|
64
|
+
|
|
65
|
+
// we load the config ourselves
|
|
66
|
+
// if you disable this is disables auto-reloading config changes
|
|
67
|
+
// configFile: false,
|
|
68
|
+
|
|
69
|
+
// TODO make this documented / configurable through the plugins
|
|
70
|
+
css: postCSSConfigPath
|
|
71
|
+
? {
|
|
72
|
+
postcss: postCSSConfigPath,
|
|
73
|
+
}
|
|
74
|
+
: {
|
|
75
|
+
transformer: 'lightningcss',
|
|
76
|
+
lightningcss: {
|
|
77
|
+
targets: {
|
|
78
|
+
safari: (15 << 16) | (2 << 8),
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
define: {
|
|
84
|
+
__DEV__: `${mode === 'development'}`,
|
|
85
|
+
'process.env.NODE_ENV': `"${mode}"`,
|
|
86
|
+
'process.env.REACT_NATIVE_VERSION': `"${version}"`,
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
resolve: {
|
|
90
|
+
alias: {
|
|
91
|
+
'react-native/package.json': resolvePath('react-native-web/package.json', root),
|
|
92
|
+
'react-native': resolvePath('react-native-web', root),
|
|
93
|
+
'react-native-safe-area-context': resolvePath('@vxrn/safe-area', root),
|
|
94
|
+
|
|
95
|
+
// bundle size optimizations
|
|
96
|
+
'query-string': resolvePath('@vxrn/query-string', root),
|
|
97
|
+
'url-parse': resolvePath('@vxrn/url-parse', root),
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
// TODO auto dedupe all include optimize deps?
|
|
101
|
+
dedupe,
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
build: {
|
|
105
|
+
commonjsOptions: {
|
|
106
|
+
transformMixedEsModules: true,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
} satisfies Omit<InlineConfig, 'plugins'>
|
|
110
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { InlineConfig } from 'vite'
|
|
2
|
+
import { getBaseViteConfig } from './getBaseViteConfigOnly'
|
|
3
|
+
import { getBaseVitePlugins } from './getBaseVitePlugins'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Consider using `getBaseViteConfig` and `getBaseVitePlugins` separately to
|
|
7
|
+
* avoid unnecessary plugin nesting and duplication.
|
|
8
|
+
*/
|
|
9
|
+
export async function getBaseViteConfigWithPlugins(
|
|
10
|
+
options: Parameters<typeof getBaseViteConfig>[0]
|
|
11
|
+
): Promise<InlineConfig> {
|
|
12
|
+
return {
|
|
13
|
+
...(await getBaseViteConfig(options)),
|
|
14
|
+
plugins: getBaseVitePlugins(),
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { PluginOption } from 'vite'
|
|
2
|
+
import { webExtensions } from '../constants'
|
|
3
|
+
import FSExtra from 'fs-extra'
|
|
4
|
+
import { extname } from 'node:path'
|
|
5
|
+
import { createVXRNCompilerPlugin } from '@vxrn/compiler'
|
|
6
|
+
|
|
7
|
+
// essentially base web config not base everything
|
|
8
|
+
|
|
9
|
+
export function getBaseVitePlugins(): PluginOption[] {
|
|
10
|
+
return [
|
|
11
|
+
{
|
|
12
|
+
name: 'platform-specific-resolve',
|
|
13
|
+
enforce: 'pre',
|
|
14
|
+
config() {
|
|
15
|
+
return {
|
|
16
|
+
resolve: {
|
|
17
|
+
// if this is on it breaks resolveId below
|
|
18
|
+
// optimizeDeps config should apply to packages in monorepo
|
|
19
|
+
// https://vite.dev/config/shared-options#resolve-preservesymlinks
|
|
20
|
+
// preserveSymlinks: true,
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
environments: {
|
|
24
|
+
ssr: {
|
|
25
|
+
resolve: {
|
|
26
|
+
extensions: webExtensions,
|
|
27
|
+
conditions: ['vxrn-web'],
|
|
28
|
+
externalConditions: ['vxrn-web'],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
client: {
|
|
33
|
+
resolve: {
|
|
34
|
+
extensions: webExtensions,
|
|
35
|
+
conditions: ['vxrn-web'],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
// this fix platform extensions if they aren't picked up, but seems it is working with resolve.extensions
|
|
43
|
+
async resolveId(source, importer, options) {
|
|
44
|
+
// if (process.env.NODE_ENV !== 'development') {
|
|
45
|
+
// // is this only dev mode problem?
|
|
46
|
+
// return
|
|
47
|
+
// }
|
|
48
|
+
|
|
49
|
+
const resolved = await this.resolve(source, importer, options)
|
|
50
|
+
|
|
51
|
+
if (!resolved || resolved.id.includes('node_modules')) {
|
|
52
|
+
return resolved
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// not in node_modules, vite doesn't apply extensions! we need to manually
|
|
56
|
+
const jsExtension = extname(resolved.id)
|
|
57
|
+
const withoutExt = resolved.id.replace(new RegExp(`\\${jsExtension}$`), '')
|
|
58
|
+
|
|
59
|
+
const extensionsByEnvironment = {
|
|
60
|
+
client: ['web'],
|
|
61
|
+
ssr: ['web'],
|
|
62
|
+
ios: ['ios', 'native'],
|
|
63
|
+
android: ['android', 'native'],
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const platformSpecificExtension = extensionsByEnvironment[this.environment.name]
|
|
67
|
+
|
|
68
|
+
if (platformSpecificExtension) {
|
|
69
|
+
for (const platformExtension of platformSpecificExtension) {
|
|
70
|
+
const fullPath = `${withoutExt}.${platformExtension}${jsExtension}`
|
|
71
|
+
if (await FSExtra.pathExists(fullPath)) {
|
|
72
|
+
return {
|
|
73
|
+
id: fullPath,
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
// temp fix
|
|
82
|
+
// avoid logging the optimizeDeps we add that aren't in the app:
|
|
83
|
+
// likely we need a whole better solution to optimize deps
|
|
84
|
+
{
|
|
85
|
+
name: `avoid-optimize-logs`,
|
|
86
|
+
|
|
87
|
+
configureServer() {
|
|
88
|
+
const ogWarn = console.warn
|
|
89
|
+
console.warn = (...args: any[]) => {
|
|
90
|
+
if (typeof args[0] === 'string' && args[0].startsWith(`Failed to resolve dependency:`)) {
|
|
91
|
+
return
|
|
92
|
+
}
|
|
93
|
+
return ogWarn(...args)
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
createVXRNCompilerPlugin({}),
|
|
99
|
+
]
|
|
100
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PluginOption } from 'vite'
|
|
2
|
+
import { defaultDepOptimizePlugin } from '../plugins/defaultDepOptimizePlugin'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Configs that should (currently) apply when using VxRN in non-CLI mode (vxrn-vite-plugin.ts).
|
|
6
|
+
*
|
|
7
|
+
* By running the `vxrn` CLI, equivalent things are done but using different methods
|
|
8
|
+
* that isn't applicable with pure Vite plugins.
|
|
9
|
+
*
|
|
10
|
+
* We can refactor this in the future to make it more consistent. Having this is just
|
|
11
|
+
* to avoid changing too much at once and cause bugs in the original CLI mode.
|
|
12
|
+
*/
|
|
13
|
+
export function getNonCliModeOnlyVitePlugins(): PluginOption[] {
|
|
14
|
+
return [
|
|
15
|
+
defaultDepOptimizePlugin(), // In CLI mode this is done by `getViteServerConfig` in dev or config building logic in `vxrn/src/exports/build.ts` on build.
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -5,10 +5,39 @@ import { join } from 'node:path'
|
|
|
5
5
|
import { readPackageJSON } from 'pkg-types'
|
|
6
6
|
import type { Mode, VXRNOptions } from '../types'
|
|
7
7
|
import { getServerOptionsFilled } from './getServerOptionsFilled'
|
|
8
|
-
import { readState, writeState } from '
|
|
8
|
+
import { readState, writeState } from '../utils/state'
|
|
9
|
+
import { getCacheDir } from '../utils/getCacheDir'
|
|
9
10
|
|
|
10
11
|
const require = createRequire(import.meta.url)
|
|
11
12
|
|
|
13
|
+
/**
|
|
14
|
+
* **NOTES**
|
|
15
|
+
*
|
|
16
|
+
* * Currently, the `VXRNOptionsFilled` type (which initially is the bag of
|
|
17
|
+
* command line arguments (`optionsIn`) filled with defaults)
|
|
18
|
+
* is used throughout the codebase. This makes it difficult to turn `vxrn`
|
|
19
|
+
* into a pure Vite plugin, because without using the vxrn CLI there will be
|
|
20
|
+
* no `VXRNOptionsFilled`.
|
|
21
|
+
* * So we plan to gradually phase out `VXRNOptionsFilled`.
|
|
22
|
+
* * The content of `VXRNOptionsFilled` can be divide into two types:
|
|
23
|
+
* 1. Values that can be derived from the Vite config object.
|
|
24
|
+
* 2. Optional settings that are rarely needed.
|
|
25
|
+
* * For type 1, we will just derive them from the Vite config object. We can
|
|
26
|
+
* create helper functions like `getSomething(config: ViteResolvedConfig)`
|
|
27
|
+
* and reuse them across sub-plugins or functions.
|
|
28
|
+
* * For type 2, we'll avoid referencing VXRNOptionsFilled entirely and
|
|
29
|
+
* instead pass individual options with sensible defaults.
|
|
30
|
+
* * Current transition strategy:
|
|
31
|
+
* * To maintain backward compatibility and avoid large-scale refactors at
|
|
32
|
+
* once, we will still leave most of the `VXRNOptionsFilled` usages there.
|
|
33
|
+
* * However, we should avoid depending on the full `VXRNOptionsFilled` type.
|
|
34
|
+
* Instead, we'll use `Pick<...>` and/or `Partial<...>` to narrow the type
|
|
35
|
+
* to only the properties actually used by each function.
|
|
36
|
+
* * This makes it easier to use these functions outside of the vxrn CLI by
|
|
37
|
+
* supplying only the required values.
|
|
38
|
+
* * Over time, we can progressively eliminate dependencies on
|
|
39
|
+
* `VXRNOptionsFilled` across the codebase.
|
|
40
|
+
*/
|
|
12
41
|
export type VXRNOptionsFilled = Awaited<ReturnType<typeof fillOptions>>
|
|
13
42
|
|
|
14
43
|
let optionsFilled: VXRNOptionsFilled | null = null
|
|
@@ -23,7 +52,7 @@ export async function fillOptions(options: VXRNOptions, { mode = 'dev' }: { mode
|
|
|
23
52
|
}
|
|
24
53
|
|
|
25
54
|
const packageRootDir = join(require.resolve('vxrn'), '../..')
|
|
26
|
-
const cacheDir =
|
|
55
|
+
const cacheDir = getCacheDir(root)
|
|
27
56
|
|
|
28
57
|
const [state, packageJSON] = await Promise.all([readState(cacheDir), readPackageJSON()])
|
|
29
58
|
|
|
@@ -16,10 +16,10 @@ import { DEFAULT_ASSET_EXTS } from '../constants/defaults'
|
|
|
16
16
|
import { nativeClientInjectPlugin } from '../plugins/clientInjectPlugin'
|
|
17
17
|
import { reactNativeCommonJsPlugin } from '../plugins/reactNativeCommonJsPlugin'
|
|
18
18
|
import { reactNativeDevAssetPlugin } from '../plugins/reactNativeDevAssetPlugin'
|
|
19
|
-
import { dedupe } from './
|
|
19
|
+
import { dedupe } from './getBaseViteConfigOnly'
|
|
20
20
|
import { getOptimizeDeps } from './getOptimizeDeps'
|
|
21
21
|
import type { VXRNOptionsFilled } from './getOptionsFilled'
|
|
22
|
-
import { swapPrebuiltReactModules } from '
|
|
22
|
+
import { swapPrebuiltReactModules } from '../utils/swapPrebuiltReactModules'
|
|
23
23
|
|
|
24
24
|
// Suppress these logs:
|
|
25
25
|
// * Use of eval in "(...)/react-native-prebuilt/vendor/react-native-0.74.1/index.js" is strongly discouraged as it poses security risks and may cause issues with minification.
|
|
@@ -28,8 +28,19 @@ import { swapPrebuiltReactModules } from './swapPrebuiltReactModules'
|
|
|
28
28
|
const IGNORE_ROLLUP_LOGS_RE =
|
|
29
29
|
/vite-native-client\/dist\/esm\/client|node_modules\/\.vxrn\/react-native|react-native-prebuilt\/vendor|one\/dist/
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
/**
|
|
32
|
+
* This is not the config that you merge into the general Vite config.
|
|
33
|
+
*
|
|
34
|
+
* It is only for building native React Native bundles, while passed directly
|
|
35
|
+
* to Vite's `createBuilder` function.
|
|
36
|
+
*
|
|
37
|
+
* Mainly used by the `getReactNativeBundle` function.
|
|
38
|
+
*/
|
|
39
|
+
export async function getReactNativeBuildConfig(
|
|
40
|
+
options: Pick<VXRNOptionsFilled, 'root' | 'cacheDir'> & {
|
|
41
|
+
server: Pick<VXRNOptionsFilled['server'], 'url' | 'port'>
|
|
42
|
+
entries: Pick<VXRNOptionsFilled['entries'], 'native'>
|
|
43
|
+
},
|
|
33
44
|
internal: { mode?: 'dev' | 'prod'; assetsDest?: string } = { mode: 'dev' },
|
|
34
45
|
platform: 'ios' | 'android'
|
|
35
46
|
) {
|
|
@@ -137,7 +148,6 @@ export async function getReactNativeConfig(
|
|
|
137
148
|
}),
|
|
138
149
|
|
|
139
150
|
reactNativeDevAssetPlugin({
|
|
140
|
-
projectRoot: options.root,
|
|
141
151
|
mode: internal.mode,
|
|
142
152
|
assetsDest: internal.assetsDest,
|
|
143
153
|
assetExts: DEFAULT_ASSET_EXTS,
|
|
@@ -296,6 +306,7 @@ export async function getReactNativeConfig(
|
|
|
296
306
|
}
|
|
297
307
|
|
|
298
308
|
let resolvedConfig: ResolvedConfig | null = null
|
|
309
|
+
/** Use by things such as the reactNativeHMRPlugin to get the config after the initial build. */
|
|
299
310
|
export function getReactNativeResolvedConfig() {
|
|
300
311
|
return resolvedConfig
|
|
301
312
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ExpoManifestRequestHandlerPluginPluginOptions,
|
|
3
|
+
expoManifestRequestHandlerPlugin as metroExpoManifestRequestHandlerPlugin,
|
|
4
|
+
metroPlugin,
|
|
5
|
+
type MetroPluginOptions,
|
|
6
|
+
} from '@vxrn/vite-plugin-metro'
|
|
7
|
+
|
|
8
|
+
import type { VXRNOptionsFilled } from './getOptionsFilled'
|
|
9
|
+
import { DEFAULT_ASSET_EXTS } from '../constants/defaults'
|
|
10
|
+
import { getServerConfigPlugin } from '../plugins/clientInjectPlugin'
|
|
11
|
+
import { expoManifestRequestHandlerPlugin } from '../plugins/expoManifestRequestHandlerPlugin'
|
|
12
|
+
import { reactNativeDevAssetPlugin } from '../plugins/reactNativeDevAssetPlugin'
|
|
13
|
+
import { createReactNativeDevServerPlugin } from '../plugins/reactNativeDevServer'
|
|
14
|
+
import { reactNativeHMRPlugin } from '../plugins/reactNativeHMRPlugin'
|
|
15
|
+
import { applyBuiltInPatchesPlugin } from '../plugins/applyBuiltInPatchesPlugin'
|
|
16
|
+
|
|
17
|
+
export function getReactNativePlugins(
|
|
18
|
+
config?: Partial<
|
|
19
|
+
Pick<VXRNOptionsFilled, 'cacheDir' | 'debugBundle' | 'debugBundlePaths' | 'entries'>
|
|
20
|
+
>,
|
|
21
|
+
{
|
|
22
|
+
metro,
|
|
23
|
+
}: {
|
|
24
|
+
/** Passing a non-null value will enable metro mode */
|
|
25
|
+
metro?: (MetroPluginOptions & ExpoManifestRequestHandlerPluginPluginOptions) | null
|
|
26
|
+
} = {}
|
|
27
|
+
) {
|
|
28
|
+
const metroOptions: typeof metro = metro || globalThis['__vxrnMetroOptions__']
|
|
29
|
+
if (metroOptions) {
|
|
30
|
+
// Metro mode
|
|
31
|
+
return [metroExpoManifestRequestHandlerPlugin(metroOptions), metroPlugin(metroOptions)]
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return [
|
|
35
|
+
createReactNativeDevServerPlugin(config),
|
|
36
|
+
|
|
37
|
+
getServerConfigPlugin(),
|
|
38
|
+
|
|
39
|
+
applyBuiltInPatchesPlugin(),
|
|
40
|
+
|
|
41
|
+
reactNativeHMRPlugin({
|
|
42
|
+
...config,
|
|
43
|
+
assetExts: DEFAULT_ASSET_EXTS,
|
|
44
|
+
}),
|
|
45
|
+
|
|
46
|
+
expoManifestRequestHandlerPlugin({}),
|
|
47
|
+
|
|
48
|
+
reactNativeDevAssetPlugin({
|
|
49
|
+
assetExts: DEFAULT_ASSET_EXTS,
|
|
50
|
+
}),
|
|
51
|
+
]
|
|
52
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { mergeConfig, type InlineConfig, type UserConfig } from 'vite'
|
|
2
|
+
|
|
3
|
+
import { getBaseViteConfigWithPlugins } from './getBaseViteConfigWithPlugins'
|
|
4
|
+
import { getOptimizeDeps } from './getOptimizeDeps'
|
|
5
|
+
import type { VXRNOptionsFilled } from './getOptionsFilled'
|
|
6
|
+
import { mergeUserConfig } from './mergeUserConfig'
|
|
7
|
+
|
|
8
|
+
import { getReactNativePlugins } from './getReactNativePlugins'
|
|
9
|
+
import { getAdditionalViteConfig } from './getAdditionalViteConfig'
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Only used in CLI mode since this hard-codes the `mode` to `'serve'` and contains
|
|
13
|
+
* custom config merging logic.
|
|
14
|
+
*/
|
|
15
|
+
export async function getViteServerConfig(config: VXRNOptionsFilled, userViteConfig?: UserConfig) {
|
|
16
|
+
const { root, server } = config
|
|
17
|
+
const { optimizeDeps } = getOptimizeDeps('serve')
|
|
18
|
+
|
|
19
|
+
// TODO: can we move most of this into `one` plugin:
|
|
20
|
+
let serverConfig: UserConfig = mergeConfig(
|
|
21
|
+
await getBaseViteConfigWithPlugins(config),
|
|
22
|
+
|
|
23
|
+
mergeConfig(getAdditionalViteConfig(), {
|
|
24
|
+
plugins: [...getReactNativePlugins(config)],
|
|
25
|
+
server: {
|
|
26
|
+
hmr: {
|
|
27
|
+
path: '/__vxrnhmr',
|
|
28
|
+
},
|
|
29
|
+
host: server.host,
|
|
30
|
+
port: server.port,
|
|
31
|
+
},
|
|
32
|
+
root,
|
|
33
|
+
} satisfies UserConfig)
|
|
34
|
+
) satisfies InlineConfig
|
|
35
|
+
|
|
36
|
+
const rerouteNoExternalConfig = userViteConfig?.ssr?.noExternal === true
|
|
37
|
+
if (rerouteNoExternalConfig) {
|
|
38
|
+
console.warn(`[rerouteNoExternalConfig] delete userViteConfig.ssr.noExternal`)
|
|
39
|
+
delete userViteConfig.ssr!.noExternal
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// don't merge full user vite config because vite will do that since we don't disable configFile
|
|
43
|
+
// because we want vite to watch the configFile for changes
|
|
44
|
+
// but we need to probably avoid loading the config before vite does in the future
|
|
45
|
+
// for some reason i do have to merge this partial config or else it doesnt pick up things which
|
|
46
|
+
const { plugins, ...rest } = userViteConfig || {}
|
|
47
|
+
const mergableUserConf = {
|
|
48
|
+
...rest,
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
serverConfig = mergeUserConfig(optimizeDeps, serverConfig, mergableUserConf)
|
|
52
|
+
|
|
53
|
+
if (rerouteNoExternalConfig) {
|
|
54
|
+
serverConfig.ssr!.noExternal = true
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// manually merge
|
|
58
|
+
if (process.env.DEBUG) {
|
|
59
|
+
// console.debug('user config in:', JSON.stringify(userViteConfig, null, 2), `\n----\n`)
|
|
60
|
+
console.debug('merged config:', JSON.stringify(serverConfig, null, 2), `\n----\n`)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return serverConfig
|
|
64
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mergeConfig, type DepOptimizationConfig, type UserConfig } from 'vite'
|
|
2
|
-
import { coerceToArray } from '
|
|
3
|
-
import { uniq } from '
|
|
2
|
+
import { coerceToArray } from '../utils/coerceToArray'
|
|
3
|
+
import { uniq } from '../utils/uniq'
|
|
4
4
|
|
|
5
5
|
type OptimizeDepsConf = {
|
|
6
6
|
include: string[]
|