Skip to content

Load from submodule gets wrong package.json #35

Closed
@iliakan

Description

@iliakan

I wrote a module (gulp task) which uses gulp-load-plugins().

When this module is installed and used by the "Main app", findup looks for package.json in cwd, that is the main app's working directory, and it tries to load plugins for the main app instead.

Takes more time and actually main app has another set of plugins, so that's just wrong.

Solved it like this:

const gp = require('gulp-load-plugins')({
  config: path.join(__dirname, 'package.json')
});

I wonder if there's a better way of searching package.json?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions