ch1ffa / relay-compiler-webpack-plugin

MIT License
10 stars 1 forks source link

New configFile option #3

Closed chillu closed 2 years ago

chillu commented 2 years ago

The relay-compiler has the following signature:

USAGE:
    relay [OPTIONS] [CONFIG]

ARGS:
    <CONFIG>    Compile using this config file. If not provided, searches for a config in package.json under the `relay` key or `relay.config.json` files among other up from the current working directory

OPTIONS:
   ...

This change allows configuration through named config files (<CONFIG> arg). The need was triggered by a current bug in Relay around auto-detection of config files with their default naming: https://github.com/facebook/relay/issues/3890

The arg is passed to Relay compiler without any additional path resolution or sanitisation, which feels inline with providing a lightweight Webpack wrapper around the relay-compiler CLI command.

ch1ffa commented 2 years ago

@chillu thank you for your contribution and sorry for the late response. I'm going to merge it now and publish.

chillu commented 2 years ago

@ch1ffa Thank you! Could you publish a 0.2.0 release? The current 0.1.7 release is 3 months old and doesn't include this fix.

ch1ffa commented 2 years ago

@chillu Published. Just renamed to config as it's named in the compiler itself and moved it to options for the validation purpose.