aiconfig icon indicating copy to clipboard operation
aiconfig copied to clipboard

Use react-app-rewired and react-app-rewire-alias for DevX

Open rholinshead opened this issue 1 year ago • 0 comments

Use react-app-rewired and react-app-rewire-alias for DevX

Use react-app-rewired and react-app-rewire-alias for DevX

The first step in fixing the DevX for the new packaging structure is to get HMR working to ensure changes to code get reflected in the browser during development. This PR leverages react-app-rewired and react-app-rewire-alias to allow us to:

  1. Override the default configurations set in place by the react-scripts setup we're using (mainly, webpack configuration)
  2. Specify aliases for paths, which enables us to link to our local aiconfig-editor package code instead of the node modules package

Unfortunately, 2. only applies to the react code itself right now, NOT type declarations. So, you can do something like remove/change existing components in jsx, but changing their props will not be reflected in HMR...

Next PR should fix that


Stack created with Sapling. Best reviewed with ReviewStack.

  • #955
  • -> #954
  • #830

rholinshead avatar Jan 18 '24 00:01 rholinshead