one 1.1.290 → 1.1.291
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/vite/one.js +28 -0
- package/dist/cjs/vite/one.js.map +1 -1
- package/dist/cjs/vite/one.native.js +28 -0
- package/dist/cjs/vite/one.native.js.map +2 -2
- package/dist/esm/vite/one.js +28 -0
- package/dist/esm/vite/one.js.map +1 -1
- package/dist/esm/vite/one.mjs +27 -0
- package/dist/esm/vite/one.mjs.map +1 -1
- package/dist/esm/vite/one.native.js +28 -0
- package/dist/esm/vite/one.native.js.map +1 -1
- package/package.json +6 -5
- package/src/vite/one.ts +34 -1
- package/types/vite/one.d.ts.map +1 -1
package/dist/cjs/vite/one.js
CHANGED
@@ -62,6 +62,34 @@ function one(options = {}) {
|
|
62
62
|
}
|
63
63
|
}
|
64
64
|
),
|
65
|
+
{
|
66
|
+
name: "one-slim-deps",
|
67
|
+
enforce: "pre",
|
68
|
+
config() {
|
69
|
+
return {
|
70
|
+
resolve: {
|
71
|
+
alias: {
|
72
|
+
tslib: (0, import_requireResolve.requireResolve)("@vxrn/tslib-lite")
|
73
|
+
}
|
74
|
+
// [
|
75
|
+
// {
|
76
|
+
// find: /tslib/,
|
77
|
+
// replacement: requireResolve('@vxrn/tslib-lite'),
|
78
|
+
// },
|
79
|
+
// // not working but would save ~30Kb stat
|
80
|
+
// // {
|
81
|
+
// // find: /@react-navigation\/core.*\/getStateFromPath/,
|
82
|
+
// // replacement: join(forkPath, 'fork', 'getStateFromPath.mjs'),
|
83
|
+
// // },
|
84
|
+
// // {
|
85
|
+
// // find: /@react-navigation\/core.*\/getPathFromState/,
|
86
|
+
// // replacement: join(forkPath, 'fork', 'getPathFromState.mjs'),
|
87
|
+
// // },
|
88
|
+
// ],
|
89
|
+
}
|
90
|
+
};
|
91
|
+
}
|
92
|
+
},
|
65
93
|
{
|
66
94
|
name: "one:init-config",
|
67
95
|
config() {
|
package/dist/cjs/vite/one.js.map
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"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BAAmB,SAA4B;AAKnE,MAAI,CAJU,UAAM,gCAAmB;AAAA,IACrC,MAAM;AAAA,IACN;AAAA,EACF,CAAC;AAEC,UAAM,IAAI,MAAM,iBAAiB;AAEnC,QAAM,eAAe,kBAAkB;AACvC,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,+BAA+B;AAEjD,SAAO;AACT;",
|
5
5
|
"names": ["events", "tsconfigPaths", "path"]
|
6
6
|
}
|
@@ -61,6 +61,34 @@ function one() {
|
|
61
61
|
return Reflect.get(tsConfigPathsPlugin, key, thisArg);
|
62
62
|
}
|
63
63
|
}),
|
64
|
+
{
|
65
|
+
name: "one-slim-deps",
|
66
|
+
enforce: "pre",
|
67
|
+
config() {
|
68
|
+
return {
|
69
|
+
resolve: {
|
70
|
+
alias: {
|
71
|
+
tslib: (0, import_requireResolve.requireResolve)("@vxrn/tslib-lite")
|
72
|
+
}
|
73
|
+
}
|
74
|
+
};
|
75
|
+
}
|
76
|
+
},
|
77
|
+
// [
|
78
|
+
// {
|
79
|
+
// find: /tslib/,
|
80
|
+
// replacement: requireResolve('@vxrn/tslib-lite'),
|
81
|
+
// },
|
82
|
+
// // not working but would save ~30Kb stat
|
83
|
+
// // {
|
84
|
+
// // find: /@react-navigation\/core.*\/getStateFromPath/,
|
85
|
+
// // replacement: join(forkPath, 'fork', 'getStateFromPath.mjs'),
|
86
|
+
// // },
|
87
|
+
// // {
|
88
|
+
// // find: /@react-navigation\/core.*\/getPathFromState/,
|
89
|
+
// // replacement: join(forkPath, 'fork', 'getPathFromState.mjs'),
|
90
|
+
// // },
|
91
|
+
// ],
|
64
92
|
{
|
65
93
|
name: "one:init-config",
|
66
94
|
config() {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../src/vite/Users/n8/vxrn/packages/one/src/vite/one.ts"],
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;yBAAmB,oCACnB,
|
5
|
-
"names": ["events", "setMaxListeners", "globalThis", "__vxrnEnableNativeEnv", "one", "options", "oneOptions", "loadEnv", "process", "cwd", "config", "ensureTSConfig", "optimizeDeps", "getOptimizeDeps", "optimizeIds", "include", "optimizeIdRegex", "RegExp", "map", "id", "replace", "join", "tsConfigPathsPlugin", "vxrnOptions", "getOptionsFilled", "devAndProdPlugins", "Proxy", "name", "configIncoming", "pathsConfig", "tsConfigPaths", "plugins", "flat", "some", "p", "tsconfigPaths", "configResolved", "resolveId", "get", "target", "key", "thisArg", "Reflect", "define", "web", "defaultRenderMode", "JSON", "stringify", "setupFile", "env", "NODE_ENV", "server", "url", "environments", "client", "ssr", "zero", "TESTING", "REPLICACHE_VERSION", "ZERO_VERSION", "hotUpdate", "modules", "m", "relativePath", "path", "relative", "root", "rootDir", "split", "sep", "acceptedHmrExports", "Set", "__vxrnAddNativePlugins", "clientTreeShakePlugin", "__vxrnAddWebPluginsProd", "createFileSystemRouter", "generateTypesForRoutes", "fixDependenciesPlugin", "deps", "createVirtualEntry", "app", "
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;yBAAmB,oCACnB,mBAA6C,kCAC7C,cAAoF,iBACpF,6BAA0B,4CAC1B,cAAoE,iBACpE,0BAAO,gCACP,qBAA4B,iCAC5B,wBAA+B,oCAC/B,+BAAsC,oCACtC,gCAAuC,qCACvC,wBAA+B,6BAC/B,+BAAsC,oCACtC,gCAAuC,qCACvC,iBAAwB,sBAExB,4BAAmD,iCACnD,0BAAiC;AAEjCA,mBAAAA,QAAOC,gBAAgB,GAAA;AAGvBC,WAAWC,wBAAwB;AAE5B,SAASC,MAAAA;MAAIC,UAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAA6B,CAAC,GAM5CA;AALJC,eAAaD,aAERE,wBAAQC,QAAQC,IAAG,CAAA,KAGpBJ,kBAAAA,QAAQK,YAAM,QAAdL,oBAAAA,SAAAA,SA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F;MACF;IACF;QAEAG,0CAAiB;MACfC,SAAS;QAACC;;IACZ,CAAA;;AAEJ;AAEA,IAAIpG,aAAuC;AAE3C,eAAeqG,kBAAkBC,SAA2B;AAC1D,MAAI,CAACtG,YAAY;AACf,QAAI,CAACsG,QAAS,OAAM,IAAIC,MAAM,yCAAyC;AACvE,UAAMC,mBAAmBF,OAAAA;EAC3B;AACA,MAAI,CAACtG;AACH,UAAM,IAAIuG,MAAM,uBAAuB;AAEzC,SAAOvG;AACT;AAEA,eAAsBwG,mBAAmBF,SAA0B;AACjE,MAAMG,QAAQ,UAAMC,gCAAmB;IACrCC,MAAM;IACNL;EACF,CAAA;AACA,MAAI,CAACG;AACH,UAAM,IAAIF,MAAM,iBAAiB;AAEnC,MAAMK,eAAeP,kBAAAA;AACrB,MAAI,CAACO;AACH,UAAM,IAAIL,MAAM,+BAA+B;AAEjD,SAAOK;AACT;",
|
5
|
+
"names": ["events", "setMaxListeners", "globalThis", "__vxrnEnableNativeEnv", "one", "options", "oneOptions", "loadEnv", "process", "cwd", "config", "ensureTSConfig", "optimizeDeps", "getOptimizeDeps", "optimizeIds", "include", "optimizeIdRegex", "RegExp", "map", "id", "replace", "join", "tsConfigPathsPlugin", "vxrnOptions", "getOptionsFilled", "devAndProdPlugins", "Proxy", "name", "configIncoming", "pathsConfig", "tsConfigPaths", "plugins", "flat", "some", "p", "tsconfigPaths", "configResolved", "resolveId", "get", "target", "key", "thisArg", "Reflect", "enforce", "resolve", "alias", "tslib", "requireResolve", "define", "web", "defaultRenderMode", "JSON", "stringify", "setupFile", "env", "NODE_ENV", "server", "url", "environments", "client", "ssr", "zero", "TESTING", "REPLICACHE_VERSION", "ZERO_VERSION", "hotUpdate", "modules", "m", "relativePath", "path", "relative", "root", "rootDir", "split", "sep", "acceptedHmrExports", "Set", "__vxrnAddNativePlugins", "clientTreeShakePlugin", "__vxrnAddWebPluginsProd", "createFileSystemRouter", "generateTypesForRoutes", "fixDependenciesPlugin", "deps", "createVirtualEntry", "app", "sharedNativeConfig", "react", "ios", "android", "applyToEnvironment", "environment", "isWebEnvironment", "importer", "shouldOptimize", "test", "absolutePath", "dirname", "webPath", "directoryPath", "existsAsync", "err", "console", "warn", "vitePluginSsrCss", "entries", "virtualEntryId", "getUserOneOptions", "command", "Error", "loadUserOneOptions", "found", "loadConfigFromFile", "mode", "foundOptions"]
|
6
6
|
}
|
package/dist/esm/vite/one.js
CHANGED
@@ -49,6 +49,34 @@ function one(options = {}) {
|
|
49
49
|
}
|
50
50
|
}
|
51
51
|
),
|
52
|
+
{
|
53
|
+
name: "one-slim-deps",
|
54
|
+
enforce: "pre",
|
55
|
+
config() {
|
56
|
+
return {
|
57
|
+
resolve: {
|
58
|
+
alias: {
|
59
|
+
tslib: requireResolve("@vxrn/tslib-lite")
|
60
|
+
}
|
61
|
+
// [
|
62
|
+
// {
|
63
|
+
// find: /tslib/,
|
64
|
+
// replacement: requireResolve('@vxrn/tslib-lite'),
|
65
|
+
// },
|
66
|
+
// // not working but would save ~30Kb stat
|
67
|
+
// // {
|
68
|
+
// // find: /@react-navigation\/core.*\/getStateFromPath/,
|
69
|
+
// // replacement: join(forkPath, 'fork', 'getStateFromPath.mjs'),
|
70
|
+
// // },
|
71
|
+
// // {
|
72
|
+
// // find: /@react-navigation\/core.*\/getPathFromState/,
|
73
|
+
// // replacement: join(forkPath, 'fork', 'getPathFromState.mjs'),
|
74
|
+
// // },
|
75
|
+
// ],
|
76
|
+
}
|
77
|
+
};
|
78
|
+
}
|
79
|
+
},
|
52
80
|
{
|
53
81
|
name: "one:init-config",
|
54
82
|
config() {
|
package/dist/esm/vite/one.js.map
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../src/vite/one.ts"],
|
4
|
-
"mappings": "AAAA,OAAO,YAAY;AACnB,OAAO,QAAQ,
|
4
|
+
"mappings": "AAAA,OAAO,YAAY;AACnB,OAAO,QAAQ,SAAe,eAAe;AAC7C,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
5
5
|
"names": []
|
6
6
|
}
|
package/dist/esm/vite/one.mjs
CHANGED
@@ -44,6 +44,33 @@ function one(options = {}) {
|
|
44
44
|
if (tsConfigPathsPlugin) return Reflect.get(tsConfigPathsPlugin, key, thisArg);
|
45
45
|
}
|
46
46
|
}), {
|
47
|
+
name: "one-slim-deps",
|
48
|
+
enforce: "pre",
|
49
|
+
config() {
|
50
|
+
return {
|
51
|
+
resolve: {
|
52
|
+
alias: {
|
53
|
+
tslib: requireResolve("@vxrn/tslib-lite")
|
54
|
+
}
|
55
|
+
// [
|
56
|
+
// {
|
57
|
+
// find: /tslib/,
|
58
|
+
// replacement: requireResolve('@vxrn/tslib-lite'),
|
59
|
+
// },
|
60
|
+
// // not working but would save ~30Kb stat
|
61
|
+
// // {
|
62
|
+
// // find: /@react-navigation\/core.*\/getStateFromPath/,
|
63
|
+
// // replacement: join(forkPath, 'fork', 'getStateFromPath.mjs'),
|
64
|
+
// // },
|
65
|
+
// // {
|
66
|
+
// // find: /@react-navigation\/core.*\/getPathFromState/,
|
67
|
+
// // replacement: join(forkPath, 'fork', 'getPathFromState.mjs'),
|
68
|
+
// // },
|
69
|
+
// ],
|
70
|
+
}
|
71
|
+
};
|
72
|
+
}
|
73
|
+
}, {
|
47
74
|
name: "one:init-config",
|
48
75
|
config() {
|
49
76
|
return {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["events","path","dirname","resolve","loadConfigFromFile","tsconfigPaths","getOptimizeDeps","getOptionsFilled","isWebEnvironment","existsAsync","requireResolve","clientTreeShakePlugin","createFileSystemRouter","ensureTSConfig","fixDependenciesPlugin","generateTypesForRoutes","loadEnv","createVirtualEntry","virtualEntryId","vitePluginSsrCss","setMaxListeners","globalThis","__vxrnEnableNativeEnv","one","options","oneOptions","process","cwd","config","__vxrnPluginConfig__","optimizeDeps","optimizeIds","include","optimizeIdRegex","RegExp","map","id","replace","join","tsConfigPathsPlugin","vxrnOptions","devAndProdPlugins","Proxy","name","configIncoming","pathsConfig","tsConfigPaths","plugins","flat","some","p","configResolved","resolveId","get","target","key","thisArg","Reflect","define","web","defaultRenderMode","JSON","stringify","setupFile","env","NODE_ENV","server","url","environments","client","ssr","zero","TESTING","REPLICACHE_VERSION","ZERO_VERSION","hotUpdate","modules","m","relative","root","split","sep","acceptedHmrExports","Set","__vxrnAddNativePlugins","__vxrnAddWebPluginsProd","deps","app","
|
1
|
+
{"version":3,"names":["events","path","dirname","resolve","loadConfigFromFile","tsconfigPaths","getOptimizeDeps","getOptionsFilled","isWebEnvironment","existsAsync","requireResolve","clientTreeShakePlugin","createFileSystemRouter","ensureTSConfig","fixDependenciesPlugin","generateTypesForRoutes","loadEnv","createVirtualEntry","virtualEntryId","vitePluginSsrCss","setMaxListeners","globalThis","__vxrnEnableNativeEnv","one","options","oneOptions","process","cwd","config","__vxrnPluginConfig__","optimizeDeps","optimizeIds","include","optimizeIdRegex","RegExp","map","id","replace","join","tsConfigPathsPlugin","vxrnOptions","devAndProdPlugins","Proxy","name","configIncoming","pathsConfig","tsConfigPaths","plugins","flat","some","p","configResolved","resolveId","get","target","key","thisArg","Reflect","enforce","alias","tslib","define","web","defaultRenderMode","JSON","stringify","setupFile","env","NODE_ENV","server","url","environments","client","ssr","zero","TESTING","REPLICACHE_VERSION","ZERO_VERSION","hotUpdate","modules","m","relative","root","split","sep","acceptedHmrExports","Set","__vxrnAddNativePlugins","__vxrnAddWebPluginsProd","deps","app","sharedNativeConfig","react","ios","android","applyToEnvironment","environment","importer","test","absolutePath","webPath","directoryPath","err","console","warn","entries","getUserOneOptions","command","Error","loadUserOneOptions","mode","foundOptions"],"sources":["../../../src/vite/one.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,MAAA,MAAY;AACnB,OAAOC,IAAA,IAAQC,OAAA,EAAeC,OAAA,QAAe;AAC7C,SAA0DC,kBAAA,QAA0B;AACpF,OAAOC,aAAA,MAAmB;AAC1B,SAASC,eAAA,EAAiBC,gBAAA,EAAkBC,gBAAA,QAAwB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AAA;QAEX,SAASE,GAAA,EAAK;UACZC,OAAA,CAAQC,IAAA,CAAK,uBAAuBF,GAAG;QACzC;MACF;IACF;EACF,GAEAnF,gBAAA,CAAiB;IACfsF,OAAA,EAAS,CAACvF,cAAc;EAC1B,CAAC,EACH;AACF;AAEA,IAAIO,UAAA,GAAuC;AAE3C,eAAeiF,kBAAkBC,OAAA,EAA6B;EAC5D,IAAI,CAAClF,UAAA,EAAY;IACf,IAAI,CAACkF,OAAA,EAAS,MAAM,IAAIC,KAAA,CAAM,yCAAyC;IACvE,MAAMC,kBAAA,CAAmBF,OAAO;EAClC;EACA,IAAI,CAAClF,UAAA,EACH,MAAM,IAAImF,KAAA,CAAM,uBAAuB;EAEzC,OAAOnF,UAAA;AACT;AAEA,eAAsBoF,mBAAmBF,OAAA,EAA4B;EAKnE,IAAI,EAJU,MAAMvG,kBAAA,CAAmB;IACrC0G,IAAA,EAAM;IACNH;EACF,CAAC,IAEC,MAAM,IAAIC,KAAA,CAAM,iBAAiB;EAEnC,MAAMG,YAAA,GAAeL,iBAAA,CAAkB;EACvC,IAAI,CAACK,YAAA,EACH,MAAM,IAAIH,KAAA,CAAM,+BAA+B;EAEjD,OAAOG,YAAA;AACT","ignoreList":[]}
|
@@ -52,6 +52,34 @@ function one() {
|
|
52
52
|
if (tsConfigPathsPlugin) return Reflect.get(tsConfigPathsPlugin, key, thisArg);
|
53
53
|
}
|
54
54
|
}), {
|
55
|
+
name: "one-slim-deps",
|
56
|
+
enforce: "pre",
|
57
|
+
config() {
|
58
|
+
return {
|
59
|
+
resolve: {
|
60
|
+
alias: {
|
61
|
+
tslib: requireResolve("@vxrn/tslib-lite")
|
62
|
+
}
|
63
|
+
}
|
64
|
+
};
|
65
|
+
}
|
66
|
+
},
|
67
|
+
// [
|
68
|
+
// {
|
69
|
+
// find: /tslib/,
|
70
|
+
// replacement: requireResolve('@vxrn/tslib-lite'),
|
71
|
+
// },
|
72
|
+
// // not working but would save ~30Kb stat
|
73
|
+
// // {
|
74
|
+
// // find: /@react-navigation\/core.*\/getStateFromPath/,
|
75
|
+
// // replacement: join(forkPath, 'fork', 'getStateFromPath.mjs'),
|
76
|
+
// // },
|
77
|
+
// // {
|
78
|
+
// // find: /@react-navigation\/core.*\/getPathFromState/,
|
79
|
+
// // replacement: join(forkPath, 'fork', 'getPathFromState.mjs'),
|
80
|
+
// // },
|
81
|
+
// ],
|
82
|
+
{
|
55
83
|
name: "one:init-config",
|
56
84
|
config() {
|
57
85
|
var _options_web;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["events","path","dirname","resolve","loadConfigFromFile","tsconfigPaths","getOptimizeDeps","getOptionsFilled","isWebEnvironment","existsAsync","requireResolve","clientTreeShakePlugin","createFileSystemRouter","ensureTSConfig","fixDependenciesPlugin","generateTypesForRoutes","loadEnv","createVirtualEntry","virtualEntryId","vitePluginSsrCss","setMaxListeners","globalThis","__vxrnEnableNativeEnv","one","options","arguments","length","_options_config","oneOptions","process","cwd","config","__vxrnPluginConfig__","optimizeDeps","optimizeIds","include","optimizeIdRegex","RegExp","map","id","replace","join","tsConfigPathsPlugin","vxrnOptions","devAndProdPlugins","Proxy","name","configIncoming","_options_config2","_configIncoming_plugins","pathsConfig","tsConfigPaths","plugins","flat","some","p","configResolved","resolveId","get","target","key","thisArg","Reflect","_options_web","define","web","defaultRenderMode","JSON","stringify","setupFile","env","NODE_ENV","server","url","environments","client","ssr","zero","TESTING","REPLICACHE_VERSION","ZERO_VERSION","hotUpdate","param","modules","m","relativePath","relative","root","rootDir","split","sep","acceptedHmrExports","Set","__vxrnAddNativePlugins","__vxrnAddWebPluginsProd","deps","_options_app","app","
|
1
|
+
{"version":3,"names":["events","path","dirname","resolve","loadConfigFromFile","tsconfigPaths","getOptimizeDeps","getOptionsFilled","isWebEnvironment","existsAsync","requireResolve","clientTreeShakePlugin","createFileSystemRouter","ensureTSConfig","fixDependenciesPlugin","generateTypesForRoutes","loadEnv","createVirtualEntry","virtualEntryId","vitePluginSsrCss","setMaxListeners","globalThis","__vxrnEnableNativeEnv","one","options","arguments","length","_options_config","oneOptions","process","cwd","config","__vxrnPluginConfig__","optimizeDeps","optimizeIds","include","optimizeIdRegex","RegExp","map","id","replace","join","tsConfigPathsPlugin","vxrnOptions","devAndProdPlugins","Proxy","name","configIncoming","_options_config2","_configIncoming_plugins","pathsConfig","tsConfigPaths","plugins","flat","some","p","configResolved","resolveId","get","target","key","thisArg","Reflect","enforce","alias","tslib","_options_web","define","web","defaultRenderMode","JSON","stringify","setupFile","env","NODE_ENV","server","url","environments","client","ssr","zero","TESTING","REPLICACHE_VERSION","ZERO_VERSION","hotUpdate","param","modules","m","relativePath","relative","root","rootDir","split","sep","acceptedHmrExports","Set","__vxrnAddNativePlugins","__vxrnAddWebPluginsProd","deps","_options_app","app","sharedNativeConfig","react","ios","android","applyToEnvironment","environment","importer","shouldOptimize","test","absolutePath","webPath","directoryPath","err","console","warn","entries","getUserOneOptions","command","Error","loadUserOneOptions","found","mode"],"sources":["../../../src/vite/one.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,MAAA,MAAY;AACnB,OAAOC,IAAA,IAAQC,OAAA,EAAeC,OAAA,QAAe;AAC7C,SAA0DC,kBAAA,QAA0B;AACpF,OAAOC,aAAA,MAAmB;AAC1B,SAASC,eAAA,EAAiBC,gBAAA,EAAkBC,gBAAA,QAAwB;AACpE,OAAO;AACP,SAASC,WAAA,QAAmB;AAC5B,SAASC,cAAA,QAAsB;AAC/B,SAASC,qBAAA,QAA6B;AACtC,SAASC,sBAAA,QAA8B;AACvC,SAASC,cAAA,QAAsB;AAC/B,SAASC,qBAAA,QAA6B;AACtC,SAASC,sBAAA,QAA8B;AACvC,SAASC,OAAA,QAAe;AAExB,SAASC,kBAAA,EAAoBC,cAAA,QAAsB;AACnD,SAASC,gBAAA,QAAwB;AAEjCnB,MAAA,CAAOoB,eAAA,CAAgB,GAAK;AAG5BC,UAAA,CAAWC,qBAAA,GAAwB;AAE5B,SAASC,IAAA,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AER,IAAC,CAAA1F,UAAA,EAEC,MAAM,IAAI2F,KAAA,CAAM,uBAAiB;EAEnC,OAAM3F,UAAA;AACN;AACE,eAAU4F,kBAAMA,CAAAF,OAAA;EAElB,IAAAG,KAAO,SAAArH,kBAAA;IACTsH,IAAA","ignoreList":[]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "one",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.291",
|
4
4
|
"source": "src/index.ts",
|
5
5
|
"types": "./types/index.d.ts",
|
6
6
|
"sideEffects": false,
|
@@ -89,12 +89,13 @@
|
|
89
89
|
"@react-navigation/native-stack": "~6.9.13",
|
90
90
|
"@react-navigation/routers": "~6.1.9",
|
91
91
|
"@ungap/structured-clone": "^1.2.0",
|
92
|
-
"@vxrn/
|
93
|
-
"@vxrn/
|
92
|
+
"@vxrn/tslib-lite": "1.1.291",
|
93
|
+
"@vxrn/universal-color-scheme": "1.1.291",
|
94
|
+
"@vxrn/use-isomorphic-layout-effect": "1.1.291",
|
94
95
|
"babel-dead-code-elimination": "^1.0.6",
|
95
96
|
"citty": "^0.1.6",
|
96
97
|
"core-js": "^3.38.1",
|
97
|
-
"create-vxrn": "1.1.
|
98
|
+
"create-vxrn": "1.1.291",
|
98
99
|
"dotenv": "^16.4.5",
|
99
100
|
"escape-string-regexp": "^5.0.0",
|
100
101
|
"expo-linking": "~6.3.1",
|
@@ -116,7 +117,7 @@
|
|
116
117
|
"url-parse": "^1.5.10",
|
117
118
|
"vite": "6.0.0-beta.1",
|
118
119
|
"vite-tsconfig-paths": "^5.0.1",
|
119
|
-
"vxrn": "1.1.
|
120
|
+
"vxrn": "1.1.291",
|
120
121
|
"ws": "^8.18.0",
|
121
122
|
"xxhashjs": "^0.2.2"
|
122
123
|
},
|
package/src/vite/one.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import events from 'node:events'
|
2
|
-
import path, { dirname, resolve } from 'node:path'
|
2
|
+
import path, { dirname, join, resolve } from 'node:path'
|
3
3
|
import { type Plugin, type PluginOption, type UserConfig, loadConfigFromFile } from 'vite'
|
4
4
|
import tsconfigPaths from 'vite-tsconfig-paths'
|
5
5
|
import { getOptimizeDeps, getOptionsFilled, isWebEnvironment } from 'vxrn'
|
@@ -86,6 +86,39 @@ export function one(options: One.PluginOptions = {}): PluginOption {
|
|
86
86
|
}
|
87
87
|
),
|
88
88
|
|
89
|
+
{
|
90
|
+
name: 'one-slim-deps',
|
91
|
+
enforce: 'pre',
|
92
|
+
|
93
|
+
config() {
|
94
|
+
// const forkPath = dirname(requireResolve('one'))
|
95
|
+
|
96
|
+
return {
|
97
|
+
resolve: {
|
98
|
+
alias: {
|
99
|
+
tslib: requireResolve('@vxrn/tslib-lite'),
|
100
|
+
},
|
101
|
+
|
102
|
+
// [
|
103
|
+
// {
|
104
|
+
// find: /tslib/,
|
105
|
+
// replacement: requireResolve('@vxrn/tslib-lite'),
|
106
|
+
// },
|
107
|
+
// // not working but would save ~30Kb stat
|
108
|
+
// // {
|
109
|
+
// // find: /@react-navigation\/core.*\/getStateFromPath/,
|
110
|
+
// // replacement: join(forkPath, 'fork', 'getStateFromPath.mjs'),
|
111
|
+
// // },
|
112
|
+
// // {
|
113
|
+
// // find: /@react-navigation\/core.*\/getPathFromState/,
|
114
|
+
// // replacement: join(forkPath, 'fork', 'getPathFromState.mjs'),
|
115
|
+
// // },
|
116
|
+
// ],
|
117
|
+
},
|
118
|
+
}
|
119
|
+
},
|
120
|
+
},
|
121
|
+
|
89
122
|
{
|
90
123
|
name: 'one:init-config',
|
91
124
|
|
package/types/vite/one.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"one.d.ts","sourceRoot":"","sources":["../../src/vite/one.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,YAAY,EAAuC,MAAM,MAAM,CAAA;AAG1F,OAAO,qBAAqB,CAAA;AAS5B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AASlC,wBAAgB,GAAG,CAAC,OAAO,GAAE,GAAG,CAAC,aAAkB,GAAG,YAAY,
|
1
|
+
{"version":3,"file":"one.d.ts","sourceRoot":"","sources":["../../src/vite/one.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,YAAY,EAAuC,MAAM,MAAM,CAAA;AAG1F,OAAO,qBAAqB,CAAA;AAS5B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AASlC,wBAAgB,GAAG,CAAC,OAAO,GAAE,GAAG,CAAC,aAAkB,GAAG,YAAY,CA+RjE;AAeD,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,8BAalE"}
|