Skip to content

Commit

Permalink
feat: plugin decleare, path priority over package (#105)
Browse files Browse the repository at this point in the history
Co-authored-by: 张荣杰 <[email protected]>
  • Loading branch information
wengeezhang and wengeezhang authored Jun 10, 2022
1 parent e7424c2 commit 22bbc31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugin/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class BasePlugin implements Plugin {
constructor(name: string, configItem: PluginConfigItem) {
this.name = name;
let importPath = configItem.path ?? '';
if (configItem.package) {
if (!importPath && configItem.package) {
importPath = path.resolve(require.resolve(`${configItem.package}/package.json`), '..');
}
if (!importPath) {
Expand Down

0 comments on commit 22bbc31

Please sign in to comment.