Skip to content
This repository has been archived by the owner on Jul 2, 2020. It is now read-only.

fix: get npm root #60

Merged
merged 2 commits into from
Feb 24, 2020
Merged

fix: get npm root #60

merged 2 commits into from
Feb 24, 2020

Conversation

echosoar
Copy link
Member

No description provided.

@@ -53,7 +53,10 @@ export async function loadNpm(
try {
const npmPath = await getNpmPath(scope, npmName, npmRegistry);
assert(npmPath, 'empty npm path');
const plugin = require(npmPath);
let plugin = require(npmPath);
if (plugin.toString() === '[object Object]') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里typeof不行么。。

@czy88840616 czy88840616 merged commit a3e8d3e into master Feb 24, 2020
@czy88840616 czy88840616 deleted the fix/loadNpmPlugin branch February 24, 2020 05:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants