Skip to content

Commit 9b76e42

Browse files
committed
fix(check-plugin-id): 🔧 Adjust logic to return null if node_development is disabled
1 parent 137f06a commit 9b76e42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎packages/vitnode/src/api/lib/check-plugin-id.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ export interface PackageJSON {
1818
}
1919

2020
export const checkPluginId = (pluginName: string): null | PackageJSON => {
21+
if (!CONFIG.node_development) return null;
22+
2123
const findMonorepoRoot = (startPath: string): null | string => {
2224
let currentPath = startPath;
2325
while (currentPath !== resolve(currentPath, '..')) {
@@ -33,8 +35,6 @@ export const checkPluginId = (pluginName: string): null | PackageJSON => {
3335
};
3436

3537
const findPluginPath = (pluginName: string): null | string => {
36-
if (CONFIG.node_development) return null;
37-
3838
const cwd = process.cwd();
3939
const monorepoRoot = findMonorepoRoot(cwd);
4040

0 commit comments

Comments
 (0)