Skip to content

Commit 7652197

Browse files
committed
feat: add main-dir support to find-addons invocation
1 parent 5b9e097 commit 7652197

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/find-addons.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ export default function findAddons(isLocal: boolean): PluginSummary[] {
2626
sort: true,
2727
configName: 'denali',
2828
keyword: 'denali-addon',
29-
includeDev: true
29+
includeDev: true,
30+
resolvePackageFilter(pkg: { main?: string, mainDir?: string }) {
31+
if (pkg.mainDir) {
32+
pkg.main = pkg.main || 'index.js';
33+
pkg.main = path.join(pkg.mainDir, pkg.main);
34+
}
35+
}
3036
};
3137

3238
if (isLocal) {

0 commit comments

Comments
 (0)