web-ext icon indicating copy to clipboard operation
web-ext copied to clipboard

[Feature Request] Discover config files in Node.js code

Open mmktomato opened this issue 6 years ago • 2 comments

Is this a feature request or a bug?

A feature request.

What is the current behavior?

Below code doesn't read web-ext-config.js or webExt in package.json.

import webExt from 'web-ext';

webExt.cmd.run({
  sourceDir: '/path/to/source/',
});

What is the expected or desired behavior?

I wanted webExt.cmd.run to discover default config files. I read web-ext's code and I guess current behavior is intentional. So my suggestion is: adding an option like loadConfigFiles or configPath to webExt.cmd.run's second argument. E.g.

webExt.cmd.run({
  sourceDir: '/path/to/source/'
}, {
  loadConfigFiles: true
  // or
  // configPath: '/path/to/config'
});

I think this option would be useful for bundler plugins. Actually I'm writing my Parcel plugin. Since Parcel is "zero configuration", I'm considering some ways how I pass configuration to web-ext.

mmktomato avatar Feb 19 '20 14:02 mmktomato

Hi mmktomato! Sorry, this isn't related to the issue but there's no way to direct message on GitHub. I'm a complete rookie in world of open source. I really wish to contribute Could you please help me through some beginner-level doubts? You could share your emailID, or any other way to communicate with u.

ShivamAryaJha avatar Feb 21 '20 17:02 ShivamAryaJha

Can reproduce in 7.11.0. Hope this gets added!

2zqa avatar Feb 02 '24 23:02 2zqa