@Stability(value=Experimental) public static final class ReactComponentOptions.Builder extends Object implements software.amazon.jsii.Builder<ReactComponentOptions>
ReactComponentOptions| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
ReactComponentOptions |
build()
Builds the configured instance.
|
ReactComponentOptions.Builder |
rewire(Map<String,? extends Object> rewire)
Sets the value of
ReactRewireOptions.getRewire() |
ReactComponentOptions.Builder |
typescript(Boolean typescript)
Sets the value of
ReactComponentOptions.getTypescript() |
@Stability(value=Experimental) public ReactComponentOptions.Builder typescript(Boolean typescript)
ReactComponentOptions.getTypescript()typescript - Whether to apply options specific for TypeScript React projects.this@Stability(value=Experimental) public ReactComponentOptions.Builder rewire(Map<String,? extends Object> rewire)
ReactRewireOptions.getRewire()rewire - Rewire webpack configuration.
Use this property to override webpack configuration properties provided
by create-react-app, without needing to eject.
This property will create a config-overrides.js file in your root directory,
which will contain the desired rewiring code.
To override the configuration, you can provide simple key value pairs. Keys take the form of js code directives that traverse to the desired property. Values should be JSON serializable objects.
For example, the following config:
rewire: { "module.unknownContextCritical": false }
Will translate to the following config-overrides.js file:
module.exports = function override(config, env) {
config.module.unknownContextCritical = false;
}
this@Stability(value=Experimental) public ReactComponentOptions build()
build in interface software.amazon.jsii.Builder<ReactComponentOptions>ReactComponentOptionsNullPointerException - if any required attribute was not providedCopyright © 2021. All rights reserved.