Package io.github.cdklabs.projen.web
Interface ReactRewireOptions
-
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
ReactComponentOptions,ReactProjectOptions,ReactTypeScriptProjectOptions
- All Known Implementing Classes:
ReactComponentOptions.Jsii$Proxy,ReactProjectOptions.Jsii$Proxy,ReactRewireOptions.Jsii$Proxy,ReactTypeScriptProjectOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-03-28T21:16:43.382Z") @Stability(Experimental) public interface ReactRewireOptions extends software.amazon.jsii.JsiiSerializable
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classReactRewireOptions.BuilderA builder forReactRewireOptionsstatic classReactRewireOptions.Jsii$ProxyAn implementation forReactRewireOptions
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static ReactRewireOptions.Builderbuilder()default Map<String,Object>getRewire()(experimental) Rewire webpack configuration.
-
-
-
Method Detail
-
getRewire
@Stability(Experimental) @Nullable default Map<String,Object> getRewire()
(experimental) 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.jsfile 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.jsfile:module.exports = function override(config, env) { config.module.unknownContextCritical = false; }Default: - No rewired config.
-
builder
@Stability(Experimental) static ReactRewireOptions.Builder builder()
- Returns:
- a
ReactRewireOptions.BuilderofReactRewireOptions
-
-