@Stability(value=Experimental) public static final class ReactComponent.Builder extends Object implements software.amazon.jsii.Builder<ReactComponent>
ReactComponent.| Modifier and Type | Method and Description |
|---|---|
ReactComponent |
build() |
static ReactComponent.Builder |
create(NodeProject project) |
ReactComponent.Builder |
rewire(Map<String,? extends Object> rewire)
(experimental) Rewire webpack configuration.
|
ReactComponent.Builder |
typescript(Boolean typescript)
(experimental) Whether to apply options specific for TypeScript React projects.
|
@Stability(value=Experimental) public static ReactComponent.Builder create(NodeProject project)
project - This parameter is required.ReactComponent.Builder.@Stability(value=Experimental) public ReactComponent.Builder rewire(Map<String,? extends Object> rewire)
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;
}
Default: - No rewired config.
rewire - Rewire webpack configuration. This parameter is required.thishttps://github.com/timarney/react-app-rewired@Stability(value=Experimental) public ReactComponent.Builder typescript(Boolean typescript)
Default: false
typescript - Whether to apply options specific for TypeScript React projects. This parameter is required.this@Stability(value=Experimental) public ReactComponent build()
build in interface software.amazon.jsii.Builder<ReactComponent>Copyright © 2021. All rights reserved.