Native Folder Support (#2031)

This commit is contained in:
Syncx 2023-12-07 02:55:29 +05:30 committed by GitHub
parent 08036f7af2
commit cf7028331c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,7 +76,11 @@ const globNativesPlugin = {
if (!await existsAsync(dirPath)) continue;
const plugins = await readdir(dirPath);
for (const p of plugins) {
if (!await existsAsync(join(dirPath, p, "native.ts"))) continue;
const nativePath = join(dirPath, p, "native.ts");
const indexNativePath = join(dirPath, p, "native/index.ts");
if (!(await existsAsync(nativePath)) && !(await existsAsync(indexNativePath)))
continue;
const nameParts = p.split(".");
const namePartsWithoutTarget = nameParts.length === 1 ? nameParts : nameParts.slice(0, -1);