miaoda-expo-devkit 0.1.1-beta.22 → 0.1.1-beta.23
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/babel/plugin-lucide-react-native.js +44 -1
- package/dist/metro.d.mts +1 -0
- package/dist/metro.d.ts +1 -0
- package/dist/metro.js +12 -0
- package/dist/metro.mjs +12 -0
- package/package.json +1 -1
|
@@ -14611,6 +14611,43 @@ function resolveIconsLocation(moduleDir) {
|
|
|
14611
14611
|
};
|
|
14612
14612
|
}
|
|
14613
14613
|
var iconMapCache = /* @__PURE__ */ new Map();
|
|
14614
|
+
var aliasMap = null;
|
|
14615
|
+
function buildAliasMap(moduleDir) {
|
|
14616
|
+
if (aliasMap) return aliasMap;
|
|
14617
|
+
const { map: fileMap } = buildIconMap(moduleDir);
|
|
14618
|
+
const map = /* @__PURE__ */ new Map();
|
|
14619
|
+
const lucideDistPath = import_node_path.default.dirname(import_node_path.default.dirname(require.resolve(LUCIDE_REACT_NATIVE)));
|
|
14620
|
+
const cjsBundle = import_node_path.default.join(lucideDistPath, "cjs/lucide-react-native.js");
|
|
14621
|
+
if (import_node_fs.default.existsSync(cjsBundle)) {
|
|
14622
|
+
const content = import_node_fs.default.readFileSync(cjsBundle, "utf-8");
|
|
14623
|
+
const varToExportNames = /* @__PURE__ */ new Map();
|
|
14624
|
+
const re = /^exports\.(\w+)\s*=\s*(\w+);/gm;
|
|
14625
|
+
let m;
|
|
14626
|
+
while ((m = re.exec(content)) !== null) {
|
|
14627
|
+
const [, exportName, varName] = m;
|
|
14628
|
+
const group = varToExportNames.get(varName);
|
|
14629
|
+
if (group) {
|
|
14630
|
+
group.push(exportName);
|
|
14631
|
+
} else {
|
|
14632
|
+
varToExportNames.set(varName, [exportName]);
|
|
14633
|
+
}
|
|
14634
|
+
}
|
|
14635
|
+
for (const names of varToExportNames.values()) {
|
|
14636
|
+
if (names.length < 2) continue;
|
|
14637
|
+
const canonical = names.find((n) => fileMap.has(n.toLowerCase()));
|
|
14638
|
+
if (!canonical) continue;
|
|
14639
|
+
const canonicalLower = canonical.toLowerCase();
|
|
14640
|
+
for (const name of names) {
|
|
14641
|
+
const lower = name.toLowerCase();
|
|
14642
|
+
if (lower !== canonicalLower) {
|
|
14643
|
+
map.set(lower, canonicalLower);
|
|
14644
|
+
}
|
|
14645
|
+
}
|
|
14646
|
+
}
|
|
14647
|
+
}
|
|
14648
|
+
aliasMap = map;
|
|
14649
|
+
return map;
|
|
14650
|
+
}
|
|
14614
14651
|
function buildIconMap(moduleDir) {
|
|
14615
14652
|
const cached = iconMapCache.get(moduleDir);
|
|
14616
14653
|
if (cached) return cached;
|
|
@@ -14628,7 +14665,13 @@ function buildIconMap(moduleDir) {
|
|
|
14628
14665
|
function resolveModule(useES, name) {
|
|
14629
14666
|
const moduleDir = useES ? "esm" : "cjs";
|
|
14630
14667
|
const { map, importBasePath } = buildIconMap(moduleDir);
|
|
14631
|
-
|
|
14668
|
+
let slug = map.get(name.toLowerCase());
|
|
14669
|
+
if (!slug) {
|
|
14670
|
+
const canonical = buildAliasMap(moduleDir).get(name.toLowerCase());
|
|
14671
|
+
if (canonical) {
|
|
14672
|
+
slug = map.get(canonical);
|
|
14673
|
+
}
|
|
14674
|
+
}
|
|
14632
14675
|
if (slug) {
|
|
14633
14676
|
return `${importBasePath}/${slug}`;
|
|
14634
14677
|
}
|
package/dist/metro.d.mts
CHANGED
|
@@ -134,6 +134,7 @@ declare function withRouteEndpoint(config: MetroConfig, options: RouteEndpointOp
|
|
|
134
134
|
*
|
|
135
135
|
* withWorkspaceNodeModules — 修复沙箱中 node_modules 不在 projectRoot 内的问题
|
|
136
136
|
* withCssInterop — 为 expo-image / expo-camera 注入 NativeWind cssInterop
|
|
137
|
+
* withLucideResolver — 消除 lucide 子路径未在 exports 中声明的警告
|
|
137
138
|
* withExpoNotificationsStub — Android:expo-notifications → stub(Expo Go no-op,Dev Build 透传)
|
|
138
139
|
* withEntryInjection — 在 expo-router 启动前注入脚本(仅 __DEV__)
|
|
139
140
|
* withDevStubs — 替换 Sentry DSN / 屏蔽 LogBox(仅 __DEV__)
|
package/dist/metro.d.ts
CHANGED
|
@@ -134,6 +134,7 @@ declare function withRouteEndpoint(config: MetroConfig, options: RouteEndpointOp
|
|
|
134
134
|
*
|
|
135
135
|
* withWorkspaceNodeModules — 修复沙箱中 node_modules 不在 projectRoot 内的问题
|
|
136
136
|
* withCssInterop — 为 expo-image / expo-camera 注入 NativeWind cssInterop
|
|
137
|
+
* withLucideResolver — 消除 lucide 子路径未在 exports 中声明的警告
|
|
137
138
|
* withExpoNotificationsStub — Android:expo-notifications → stub(Expo Go no-op,Dev Build 透传)
|
|
138
139
|
* withEntryInjection — 在 expo-router 启动前注入脚本(仅 __DEV__)
|
|
139
140
|
* withDevStubs — 替换 Sentry DSN / 屏蔽 LogBox(仅 __DEV__)
|
package/dist/metro.js
CHANGED
|
@@ -300,6 +300,17 @@ function withEsbuildMinify(config) {
|
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
// src/metro/withDevkit.ts
|
|
303
|
+
function withLucideResolver(config) {
|
|
304
|
+
const upstream = config.resolver?.resolveRequest ?? null;
|
|
305
|
+
const resolveRequest = (context, moduleName, platform) => {
|
|
306
|
+
if (moduleName.startsWith("lucide-react-native/dist/")) {
|
|
307
|
+
return { filePath: require.resolve(moduleName), type: "sourceFile" };
|
|
308
|
+
}
|
|
309
|
+
if (upstream) return upstream(context, moduleName, platform);
|
|
310
|
+
return context.resolveRequest(context, moduleName, platform);
|
|
311
|
+
};
|
|
312
|
+
return { ...config, resolver: { ...config.resolver, resolveRequest } };
|
|
313
|
+
}
|
|
303
314
|
var EXPO_NOTIFICATIONS_STUB_FILENAME = "expo-notifications-stub.js";
|
|
304
315
|
var EXPO_NOTIFICATIONS_STUB_PATH = import_path7.default.resolve(__dirname, "stubs", EXPO_NOTIFICATIONS_STUB_FILENAME);
|
|
305
316
|
function withExpoNotificationsStub(config) {
|
|
@@ -319,6 +330,7 @@ function withDevkit(config, options = {}) {
|
|
|
319
330
|
config = withWorkspaceNodeModules(config);
|
|
320
331
|
config = withCssInterop(config);
|
|
321
332
|
config = withEsbuildMinify(config);
|
|
333
|
+
config = withLucideResolver(config);
|
|
322
334
|
config = withExpoNotificationsStub(config);
|
|
323
335
|
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
324
336
|
config = withEntryInjection(config);
|
package/dist/metro.mjs
CHANGED
|
@@ -262,6 +262,17 @@ function withEsbuildMinify(config) {
|
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
// src/metro/withDevkit.ts
|
|
265
|
+
function withLucideResolver(config) {
|
|
266
|
+
const upstream = config.resolver?.resolveRequest ?? null;
|
|
267
|
+
const resolveRequest = (context, moduleName, platform) => {
|
|
268
|
+
if (moduleName.startsWith("lucide-react-native/dist/")) {
|
|
269
|
+
return { filePath: __require.resolve(moduleName), type: "sourceFile" };
|
|
270
|
+
}
|
|
271
|
+
if (upstream) return upstream(context, moduleName, platform);
|
|
272
|
+
return context.resolveRequest(context, moduleName, platform);
|
|
273
|
+
};
|
|
274
|
+
return { ...config, resolver: { ...config.resolver, resolveRequest } };
|
|
275
|
+
}
|
|
265
276
|
var EXPO_NOTIFICATIONS_STUB_FILENAME = "expo-notifications-stub.js";
|
|
266
277
|
var EXPO_NOTIFICATIONS_STUB_PATH = path7.resolve(__dirname, "stubs", EXPO_NOTIFICATIONS_STUB_FILENAME);
|
|
267
278
|
function withExpoNotificationsStub(config) {
|
|
@@ -281,6 +292,7 @@ function withDevkit(config, options = {}) {
|
|
|
281
292
|
config = withWorkspaceNodeModules(config);
|
|
282
293
|
config = withCssInterop(config);
|
|
283
294
|
config = withEsbuildMinify(config);
|
|
295
|
+
config = withLucideResolver(config);
|
|
284
296
|
config = withExpoNotificationsStub(config);
|
|
285
297
|
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
286
298
|
config = withEntryInjection(config);
|