@tamagui/vite-plugin 1.89.26 → 1.89.27-1708112217600

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.
@@ -27,25 +27,168 @@ __export(getVitePath_exports, {
27
27
  });
28
28
  module.exports = __toCommonJS(getVitePath_exports);
29
29
  var import_path = require("path"), import_esm_resolve = __toESM(require("esm-resolve")), import_fs_extra = require("fs-extra");
30
- async function getVitePath(importer, moduleName, absolute = !1) {
31
- if (moduleName === "react-native")
32
- return "react-native";
33
- if (moduleName === "react")
34
- return "react";
35
- if (moduleName === "react/jsx-runtime")
36
- return "react/jsx-runtime";
37
- if (moduleName === "react/jsx-dev-runtime")
38
- return "react/jsx-dev-runtime";
39
- if (moduleName[0] === ".")
40
- return (0, import_path.join)("apps/tamastack/src", moduleName) + ".js";
41
- {
42
- const sourceFile = (0, import_path.join)(process.cwd(), "index.js"), resolved = (0, import_esm_resolve.default)(sourceFile)(moduleName);
43
- if (!resolved)
44
- throw new Error("\u274C cant find");
45
- const real = await (0, import_fs_extra.realpath)(resolved);
46
- let id = real;
47
- return absolute || (id = (0, import_path.relative)(importer, real)), id.endsWith("/react/jsx-dev-runtime.js") && (id = "react/jsx-runtime"), id;
30
+ function asyncGeneratorStep(gen, resolve2, reject, _next, _throw, key, arg) {
31
+ try {
32
+ var info = gen[key](arg), value = info.value;
33
+ } catch (error) {
34
+ reject(error);
35
+ return;
48
36
  }
37
+ info.done ? resolve2(value) : Promise.resolve(value).then(_next, _throw);
38
+ }
39
+ function _async_to_generator(fn) {
40
+ return function() {
41
+ var self = this, args = arguments;
42
+ return new Promise(function(resolve2, reject) {
43
+ var gen = fn.apply(self, args);
44
+ function _next(value) {
45
+ asyncGeneratorStep(gen, resolve2, reject, _next, _throw, "next", value);
46
+ }
47
+ function _throw(err) {
48
+ asyncGeneratorStep(gen, resolve2, reject, _next, _throw, "throw", err);
49
+ }
50
+ _next(void 0);
51
+ });
52
+ };
53
+ }
54
+ function _ts_generator(thisArg, body) {
55
+ var f, y, t, g, _ = {
56
+ label: 0,
57
+ sent: function() {
58
+ if (t[0] & 1)
59
+ throw t[1];
60
+ return t[1];
61
+ },
62
+ trys: [],
63
+ ops: []
64
+ };
65
+ return g = {
66
+ next: verb(0),
67
+ throw: verb(1),
68
+ return: verb(2)
69
+ }, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
70
+ return this;
71
+ }), g;
72
+ function verb(n) {
73
+ return function(v) {
74
+ return step([
75
+ n,
76
+ v
77
+ ]);
78
+ };
79
+ }
80
+ function step(op) {
81
+ if (f)
82
+ throw new TypeError("Generator is already executing.");
83
+ for (; _; )
84
+ try {
85
+ if (f = 1, y && (t = op[0] & 2 ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
86
+ return t;
87
+ switch (y = 0, t && (op = [
88
+ op[0] & 2,
89
+ t.value
90
+ ]), op[0]) {
91
+ case 0:
92
+ case 1:
93
+ t = op;
94
+ break;
95
+ case 4:
96
+ return _.label++, {
97
+ value: op[1],
98
+ done: !1
99
+ };
100
+ case 5:
101
+ _.label++, y = op[1], op = [
102
+ 0
103
+ ];
104
+ continue;
105
+ case 7:
106
+ op = _.ops.pop(), _.trys.pop();
107
+ continue;
108
+ default:
109
+ if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
110
+ _ = 0;
111
+ continue;
112
+ }
113
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
114
+ _.label = op[1];
115
+ break;
116
+ }
117
+ if (op[0] === 6 && _.label < t[1]) {
118
+ _.label = t[1], t = op;
119
+ break;
120
+ }
121
+ if (t && _.label < t[2]) {
122
+ _.label = t[2], _.ops.push(op);
123
+ break;
124
+ }
125
+ t[2] && _.ops.pop(), _.trys.pop();
126
+ continue;
127
+ }
128
+ op = body.call(thisArg, _);
129
+ } catch (e) {
130
+ op = [
131
+ 6,
132
+ e
133
+ ], y = 0;
134
+ } finally {
135
+ f = t = 0;
136
+ }
137
+ if (op[0] & 5)
138
+ throw op[1];
139
+ return {
140
+ value: op[0] ? op[1] : void 0,
141
+ done: !0
142
+ };
143
+ }
144
+ }
145
+ function getVitePath(importer, moduleName) {
146
+ return _getVitePath.apply(this, arguments);
147
+ }
148
+ function _getVitePath() {
149
+ return _getVitePath = _async_to_generator(function(importer, moduleName) {
150
+ var absolute, sourceFile, resolved, real, id, _arguments = arguments;
151
+ return _ts_generator(this, function(_state) {
152
+ switch (_state.label) {
153
+ case 0:
154
+ return absolute = _arguments.length > 2 && _arguments[2] !== void 0 ? _arguments[2] : !1, moduleName === "react-native" ? [
155
+ 2,
156
+ "react-native"
157
+ ] : moduleName === "react" ? [
158
+ 2,
159
+ "react"
160
+ ] : moduleName === "react/jsx-runtime" ? [
161
+ 2,
162
+ "react/jsx-runtime"
163
+ ] : moduleName === "react/jsx-dev-runtime" ? [
164
+ 2,
165
+ "react/jsx-dev-runtime"
166
+ ] : moduleName[0] !== "." ? [
167
+ 3,
168
+ 1
169
+ ] : [
170
+ 2,
171
+ (0, import_path.join)("apps/tamastack/src", moduleName) + ".js"
172
+ ];
173
+ case 1:
174
+ if (sourceFile = (0, import_path.join)(process.cwd(), "index.js"), resolved = (0, import_esm_resolve.default)(sourceFile)(moduleName), !resolved)
175
+ throw new Error("\u274C cant find");
176
+ return [
177
+ 4,
178
+ (0, import_fs_extra.realpath)(resolved)
179
+ ];
180
+ case 2:
181
+ return real = _state.sent(), id = real, absolute || (id = (0, import_path.relative)(importer, real)), id.endsWith("/react/jsx-dev-runtime.js") && (id = "react/jsx-runtime"), [
182
+ 2,
183
+ id
184
+ ];
185
+ case 3:
186
+ return [
187
+ 2
188
+ ];
189
+ }
190
+ });
191
+ }), _getVitePath.apply(this, arguments);
49
192
  }
50
193
  // Annotate the CommonJS export names for ESM import in node:
51
194
  0 && (module.exports = {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/getVitePath.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA+B,iBAE/B,qBAAoB,iCACpB,kBAAyB;AAEzB,eAAsB,YACpB,UACA,YACA,WAAW,IACX;AAEA,MAAI,eAAe;AACjB,WAAO;AAET,MAAI,eAAe;AACjB,WAAO;AAET,MAAI,eAAe;AACjB,WAAO;AAET,MAAI,eAAe;AACjB,WAAO;AAGT,MAAI,WAAW,CAAC,MAAM;AAEpB,eAAO,kBAAK,sBAAsB,UAAU,IAAI;AAC3C;AACL,UAAM,iBAAa,kBAAK,QAAQ,IAAI,GAAG,UAAU,GAC3C,eAAW,mBAAAA,SAAQ,UAAU,EAAE,UAAU;AAE/C,QAAI,CAAC;AACH,YAAM,IAAI,MAAM,kBAAa;AAE/B,UAAM,OAAO,UAAM,0BAAS,QAAQ;AACpC,QAAI,KAAK;AACT,WAAK,aACH,SAAK,sBAAS,UAAU,IAAI,IAE1B,GAAG,SAAS,2BAA2B,MACzC,KAAK,sBAEA;AAAA,EACT;AACF;",
5
- "names": ["resolve"]
3
+ "sources": ["../../src/Users/n8/tamagui/packages/vite-plugin/src/getVitePath.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAA+B,iBAE/B,qBAAoB,iCACpB,kBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzB,SAAsBA,YACpBC,UACAC,YAAkB;SAFEF,aAAAA,MAAAA,MAAAA,SAAAA;;SAAAA,eAAAA;AAAAA,wBAAf,oBAAA,SACLC,UACAC,YAAkB;QAClBC,UAoBQC,YACAC,UAKAC,MACFC;;;;AAxBN,iBAHAJ,WAAAA,WAAAA,SAAAA,KAAAA,WAAAA,CAAAA,MAAAA,SAAAA,WAAAA,CAAAA,IAAW,IAGPD,eAAe,iBACjB;;YAAO;cAELA,eAAe,UACjB;;YAAO;cAELA,eAAe,sBACjB;;YAAO;cAELA,eAAe,0BACjB;;YAAO;cAGLA,WAAW,CAAA,MAAO,MAAlBA;;;cAEF;;gBAAOM,kBAAM,sBAAqBN,UAAAA,IAAc;;;AAKhD,cAHME,iBAAaI,kBAAKC,QAAQC,IAAG,GAAI,UAAA,GACjCL,eAAWM,mBAAAA,SAAQP,UAAAA,EAAYF,UAAAA,GAEjC,CAACG;AACH,kBAAM,IAAIO,MAAO,kBAAA;AAEN,iBAAA;;gBAAMC,0BAASR,QAAAA;;;AAAtBC,wBAAO,OAAA,KAAA,GACTC,KAAKD,MACJH,aACHI,SAAKO,sBAASb,UAAUK,IAAAA,IAEtBC,GAAGQ,SAAU,2BAAA,MACfR,KAAK,sBAEP;;YAAOA;;;;;;;;EAEX,CAAA,GAvCsBP,aAAAA,MAAAA,MAAAA,SAAAA;;",
5
+ "names": ["getVitePath", "importer", "moduleName", "absolute", "sourceFile", "resolved", "real", "id", "join", "process", "cwd", "resolve", "Error", "realpath", "relative", "endsWith"]
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,qBAAd;AACA,wBAAc,sBADd;AAEA,wBAAc,0BAFd;",
3
+ "sources": ["../../src/Users/n8/tamagui/packages/vite-plugin/src/index.ts"],
4
+ "mappings": ";;;;;;;;;;;;AAAA;;wBAAc,qBAAd;AACA,wBAAc,sBADd;AAEA,wBAAc,0BAFd;",
5
5
  "names": []
6
6
  }
@@ -19,26 +19,208 @@ __export(plugin_exports, {
19
19
  });
20
20
  module.exports = __toCommonJS(plugin_exports);
21
21
  var import_static = require("@tamagui/static"), import_vite = require("vite");
22
- function tamaguiPlugin({
23
- platform = "web",
24
- ...options
25
- }) {
26
- const watcher = options.disableWatchTamaguiConfig ? null : (0, import_static.watchTamaguiConfig)({
22
+ function _array_like_to_array(arr, len) {
23
+ (len == null || len > arr.length) && (len = arr.length);
24
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
25
+ arr2[i] = arr[i];
26
+ return arr2;
27
+ }
28
+ function _array_without_holes(arr) {
29
+ if (Array.isArray(arr))
30
+ return _array_like_to_array(arr);
31
+ }
32
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
33
+ try {
34
+ var info = gen[key](arg), value = info.value;
35
+ } catch (error) {
36
+ reject(error);
37
+ return;
38
+ }
39
+ info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
40
+ }
41
+ function _async_to_generator(fn) {
42
+ return function() {
43
+ var self = this, args = arguments;
44
+ return new Promise(function(resolve, reject) {
45
+ var gen = fn.apply(self, args);
46
+ function _next(value) {
47
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
48
+ }
49
+ function _throw(err) {
50
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
51
+ }
52
+ _next(void 0);
53
+ });
54
+ };
55
+ }
56
+ function _define_property(obj, key, value) {
57
+ return key in obj ? Object.defineProperty(obj, key, {
58
+ value,
59
+ enumerable: !0,
60
+ configurable: !0,
61
+ writable: !0
62
+ }) : obj[key] = value, obj;
63
+ }
64
+ function _iterable_to_array(iter) {
65
+ if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
66
+ return Array.from(iter);
67
+ }
68
+ function _non_iterable_spread() {
69
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
70
+ }
71
+ function _object_spread(target) {
72
+ for (var i = 1; i < arguments.length; i++) {
73
+ var source = arguments[i] != null ? arguments[i] : {}, ownKeys = Object.keys(source);
74
+ typeof Object.getOwnPropertySymbols == "function" && (ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
75
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
76
+ }))), ownKeys.forEach(function(key) {
77
+ _define_property(target, key, source[key]);
78
+ });
79
+ }
80
+ return target;
81
+ }
82
+ function _object_without_properties(source, excluded) {
83
+ if (source == null)
84
+ return {};
85
+ var target = _object_without_properties_loose(source, excluded), key, i;
86
+ if (Object.getOwnPropertySymbols) {
87
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
88
+ for (i = 0; i < sourceSymbolKeys.length; i++)
89
+ key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
90
+ }
91
+ return target;
92
+ }
93
+ function _object_without_properties_loose(source, excluded) {
94
+ if (source == null)
95
+ return {};
96
+ var target = {}, sourceKeys = Object.keys(source), key, i;
97
+ for (i = 0; i < sourceKeys.length; i++)
98
+ key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
99
+ return target;
100
+ }
101
+ function _to_consumable_array(arr) {
102
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
103
+ }
104
+ function _unsupported_iterable_to_array(o, minLen) {
105
+ if (o) {
106
+ if (typeof o == "string")
107
+ return _array_like_to_array(o, minLen);
108
+ var n = Object.prototype.toString.call(o).slice(8, -1);
109
+ if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
110
+ return Array.from(n);
111
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
112
+ return _array_like_to_array(o, minLen);
113
+ }
114
+ }
115
+ function _ts_generator(thisArg, body) {
116
+ var f, y, t, g, _ = {
117
+ label: 0,
118
+ sent: function() {
119
+ if (t[0] & 1)
120
+ throw t[1];
121
+ return t[1];
122
+ },
123
+ trys: [],
124
+ ops: []
125
+ };
126
+ return g = {
127
+ next: verb(0),
128
+ throw: verb(1),
129
+ return: verb(2)
130
+ }, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
131
+ return this;
132
+ }), g;
133
+ function verb(n) {
134
+ return function(v) {
135
+ return step([
136
+ n,
137
+ v
138
+ ]);
139
+ };
140
+ }
141
+ function step(op) {
142
+ if (f)
143
+ throw new TypeError("Generator is already executing.");
144
+ for (; _; )
145
+ try {
146
+ if (f = 1, y && (t = op[0] & 2 ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
147
+ return t;
148
+ switch (y = 0, t && (op = [
149
+ op[0] & 2,
150
+ t.value
151
+ ]), op[0]) {
152
+ case 0:
153
+ case 1:
154
+ t = op;
155
+ break;
156
+ case 4:
157
+ return _.label++, {
158
+ value: op[1],
159
+ done: !1
160
+ };
161
+ case 5:
162
+ _.label++, y = op[1], op = [
163
+ 0
164
+ ];
165
+ continue;
166
+ case 7:
167
+ op = _.ops.pop(), _.trys.pop();
168
+ continue;
169
+ default:
170
+ if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
171
+ _ = 0;
172
+ continue;
173
+ }
174
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
175
+ _.label = op[1];
176
+ break;
177
+ }
178
+ if (op[0] === 6 && _.label < t[1]) {
179
+ _.label = t[1], t = op;
180
+ break;
181
+ }
182
+ if (t && _.label < t[2]) {
183
+ _.label = t[2], _.ops.push(op);
184
+ break;
185
+ }
186
+ t[2] && _.ops.pop(), _.trys.pop();
187
+ continue;
188
+ }
189
+ op = body.call(thisArg, _);
190
+ } catch (e) {
191
+ op = [
192
+ 6,
193
+ e
194
+ ], y = 0;
195
+ } finally {
196
+ f = t = 0;
197
+ }
198
+ if (op[0] & 5)
199
+ throw op[1];
200
+ return {
201
+ value: op[0] ? op[1] : void 0,
202
+ done: !0
203
+ };
204
+ }
205
+ }
206
+ function tamaguiPlugin(_param) {
207
+ var _param_platform = _param.platform, platform = _param_platform === void 0 ? "web" : _param_platform, options = _object_without_properties(_param, [
208
+ "platform"
209
+ ]), watcher = options.disableWatchTamaguiConfig ? null : (0, import_static.watchTamaguiConfig)(_object_spread({
27
210
  platform,
28
- components: ["tamagui"],
29
- config: "./src/tamagui.config.ts",
30
- ...options
31
- }), components = [
32
- .../* @__PURE__ */ new Set([...options.components || [], "tamagui", "@tamagui/core"])
33
- ], noExternalSSR = new RegExp(
34
- `${components.join("|")}|react-native|expo-linear-gradient`,
35
- "ig"
36
- ), extensions = [
37
- `.${platform}.mjs`,
38
- `.${platform}.js`,
39
- `.${platform}.jsx`,
40
- `.${platform}.ts`,
41
- `.${platform}.tsx`,
211
+ components: [
212
+ "tamagui"
213
+ ],
214
+ config: "./src/tamagui.config.ts"
215
+ }, options)), components = _to_consumable_array(new Set(_to_consumable_array(options.components || []).concat([
216
+ "tamagui",
217
+ "@tamagui/core"
218
+ ]))), noExternalSSR = new RegExp("".concat(components.join("|"), "|react-native|expo-linear-gradient"), "ig"), extensions = [
219
+ ".".concat(platform, ".mjs"),
220
+ ".".concat(platform, ".js"),
221
+ ".".concat(platform, ".jsx"),
222
+ ".".concat(platform, ".ts"),
223
+ ".".concat(platform, ".tsx"),
42
224
  ".mjs",
43
225
  ".js",
44
226
  ".mts",
@@ -46,31 +228,53 @@ function tamaguiPlugin({
46
228
  ".jsx",
47
229
  ".tsx",
48
230
  ".json"
49
- ];
50
- return {
231
+ ], plugin = {
51
232
  name: "tamagui-base",
52
233
  enforce: "pre",
53
- async buildEnd() {
54
- await (watcher == null ? void 0 : watcher.then((res) => {
55
- res == null || res.dispose();
56
- }));
57
- },
58
- // // fix expo-linear-gradient
59
- async transform(code, id) {
60
- if (id.includes("expo-linear-gradient"))
61
- return (0, import_vite.transformWithEsbuild)(code, id, {
62
- loader: "jsx",
63
- jsx: "automatic"
64
- // 👈 this is important
234
+ buildEnd: function() {
235
+ return _async_to_generator(function() {
236
+ return _ts_generator(this, function(_state) {
237
+ switch (_state.label) {
238
+ case 0:
239
+ return [
240
+ 4,
241
+ watcher == null ? void 0 : watcher.then(function(res) {
242
+ res == null || res.dispose();
243
+ })
244
+ ];
245
+ case 1:
246
+ return _state.sent(), [
247
+ 2
248
+ ];
249
+ }
65
250
  });
251
+ })();
66
252
  },
67
- config(userConfig, env) {
253
+ transform: (
254
+ // // fix expo-linear-gradient
255
+ function(code, id) {
256
+ return _async_to_generator(function() {
257
+ return _ts_generator(this, function(_state) {
258
+ return id.includes("expo-linear-gradient") ? [
259
+ 2,
260
+ (0, import_vite.transformWithEsbuild)(code, id, {
261
+ loader: "jsx",
262
+ jsx: "automatic"
263
+ })
264
+ ] : [
265
+ 2
266
+ ];
267
+ });
268
+ })();
269
+ }
270
+ ),
271
+ config: function(userConfig, env) {
68
272
  return {
69
273
  define: {
70
274
  // reanimated support
71
275
  _frameTimestamp: void 0,
72
276
  _WORKLET: !1,
73
- __DEV__: `${env.mode === "development"}`,
277
+ __DEV__: "".concat(env.mode === "development"),
74
278
  "process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV || env.mode),
75
279
  "process.env.ENABLE_RSC": JSON.stringify(process.env.ENABLE_RSC || ""),
76
280
  "process.env.ENABLE_STEPS": JSON.stringify(process.env.ENABLE_STEPS || ""),
@@ -78,7 +282,9 @@ function tamaguiPlugin({
78
282
  },
79
283
  optimizeDeps: {
80
284
  jsx: "transform",
81
- include: platform === "web" ? ["expo-linear-gradient"] : [],
285
+ include: platform === "web" ? [
286
+ "expo-linear-gradient"
287
+ ] : [],
82
288
  // disabled: false,
83
289
  esbuildOptions: {
84
290
  resolveExtensions: extensions,
@@ -92,22 +298,20 @@ function tamaguiPlugin({
92
298
  },
93
299
  resolve: {
94
300
  extensions,
95
- alias: {
96
- ...platform !== "native" && {
97
- "react-native/Libraries/Renderer/shims/ReactFabric": "@tamagui/proxy-worm",
98
- "react-native/Libraries/Utilities/codegenNativeComponent": "@tamagui/proxy-worm",
99
- "react-native-svg": "@tamagui/react-native-svg",
100
- "react-native": "react-native-web",
101
- ...options.useReactNativeWebLite && {
102
- "react-native": "react-native-web-lite",
103
- "react-native-web": "react-native-web-lite"
104
- }
105
- }
106
- }
301
+ alias: _object_spread({}, platform !== "native" && _object_spread({
302
+ "react-native/Libraries/Renderer/shims/ReactFabric": "@tamagui/proxy-worm",
303
+ "react-native/Libraries/Utilities/codegenNativeComponent": "@tamagui/proxy-worm",
304
+ "react-native-svg": "@tamagui/react-native-svg",
305
+ "react-native": "react-native-web"
306
+ }, options.useReactNativeWebLite && {
307
+ "react-native": "react-native-web-lite",
308
+ "react-native-web": "react-native-web-lite"
309
+ }))
107
310
  }
108
311
  };
109
312
  }
110
313
  };
314
+ return plugin;
111
315
  }
112
316
  // Annotate the CommonJS export names for ESM import in node:
113
317
  0 && (module.exports = {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/plugin.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAmC,4BAEnC,cAAqC;AAM9B,SAAS,cAAc;AAAA,EAC5B,WAAW;AAAA,EACX,GAAG;AACL,GAMW;AACT,QAAM,UAAU,QAAQ,4BACpB,WACA,kCAAmB;AAAA,IACjB;AAAA,IACA,YAAY,CAAC,SAAS;AAAA,IACtB,QAAQ;AAAA,IACR,GAAG;AAAA,EACL,CAAC,GAEC,aAAa;AAAA,IACjB,GAAG,oBAAI,IAAI,CAAC,GAAI,QAAQ,cAAc,CAAC,GAAI,WAAW,eAAe,CAAC;AAAA,EACxE,GACM,gBAAgB,IAAI;AAAA,IACxB,GAAG,WAAW,KAAK,GAAG,CAAC;AAAA,IACvB;AAAA,EACF,GAEM,aAAa;AAAA,IACjB,IAAI,QAAQ;AAAA,IACZ,IAAI,QAAQ;AAAA,IACZ,IAAI,QAAQ;AAAA,IACZ,IAAI,QAAQ;AAAA,IACZ,IAAI,QAAQ;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAuEA,SArEuB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AAA,EAAA;;IAGMC;;MAAN,SAAgBC,MAAMC,IAAE;eAAE,oBAAA,WAAA;;AACxB,mBAAKA,GAAGC,SAAS,sBAAA,IAKjB;;kBAAOC,kCAAqBH,MAAMC,IAAI;gBACpCG,QAAQ;gBACRC,KAAK;cACP,CAAA;gBAPE;;;;QAQJ,CAAA,EAAA;;;IAEAnB,QAAAA,SAAOoB,YAAYC,KAAG;AACpB,aAAO;QACLC,QAAQ;;UAENC,iBAAiBC;UACjBC,UAAU;UACVC,SAAU,GAA4C,OAA1CL,IAAIM,SAAS,aAAuB;UAChD,wBAAwBC,KAAKC,UAAUC,QAAQT,IAAIU,YAAYV,IAAIM,IAAI;UACvE,0BAA0BC,KAAKC,UAAUC,QAAQT,IAAIW,cAAc,EAAA;UACnE,4BAA4BJ,KAAKC,UAAUC,QAAQT,IAAIY,gBAAgB,EAAA;UACvE,yBAAyBL,KAAKC,UAAU,EAAA;QAC1C;QACAK,cAAc;UACZf,KAAK;UACLgB,SAASzC,aAAa,QAAQ;YAAC;cAA0B,CAAA;;UAEzD0C,gBAAgB;YACdC,mBAAmBhC;YACnBa,QAAQ;cACN,OAAO;YACT;UACF;QACF;QACAoB,KAAK;UACHC,YAAYrC;QACd;QACAsC,SAAS;UACPnC;UACAoC,OAAO,eAAA,CAAA,GACD/C,aAAa,YAAY,eAAA;YAC3B,qDAAqD;YACrD,2DACE;YACF,oBAAoB;YACpB,gBAAgB;aACZC,QAAQ+C,yBAAyB;YACnC,gBAAgB;YAChB,oBAAoB;UACtB,CAAA,CAAA;QAGN;MACF;IACF;EACF;AAEA,SAAOpC;AACT;",
5
+ "names": ["tamaguiPlugin", "platform", "options", "watcher", "disableWatchTamaguiConfig", "watchTamaguiConfig", "components", "config", "Set", "noExternalSSR", "RegExp", "join", "extensions", "plugin", "name", "enforce", "buildEnd", "then", "res", "dispose", "transform", "code", "id", "includes", "transformWithEsbuild", "loader", "jsx", "userConfig", "env", "define", "_frameTimestamp", "undefined", "_WORKLET", "__DEV__", "mode", "JSON", "stringify", "process", "NODE_ENV", "ENABLE_RSC", "ENABLE_STEPS", "optimizeDeps", "include", "esbuildOptions", "resolveExtensions", "ssr", "noExternal", "resolve", "alias", "useReactNativeWebLite"]
6
6
  }
@@ -1,4 +1,4 @@
1
- const extensions = [
1
+ var extensions = [
2
2
  ".ios.js",
3
3
  ".native.js",
4
4
  ".native.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/extensions.ts"],
4
- "mappings": "AAAO,MAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
5
- "names": []
3
+ "sources": ["../../src/Users/n8/tamagui/packages/vite-plugin/src/extensions.ts"],
4
+ "mappings": "AAAO,IAAMA,aAAa;EACxB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;",
5
+ "names": ["extensions"]
6
6
  }