Repository navigation
Replace react-app-rewired with webpack in webchat - #4831
stephenhand with Copilot wants to merge 6 commits into
Conversation
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The production public path points deployed pages to the wrong bundle URL, preventing the widget from loading.
3 open issues
What changed in this PR
Replaces the webchat app’s Create React App tooling with direct webpack configuration, aiming to retain its existing bundle, deployment outputs, and environment behavior.
Changes:
- Switches build and development commands to webpack CLI and webpack dev server.
- Adds explicit configuration for TypeScript compilation, HTML generation, public assets, environment constants, and the production CDN copy.
- Removes legacy rewired configuration and React Scripts dependencies.
| File | Description |
|---|---|
aselo-webchat-react-app/webpack.config.js |
Adds standalone build and development configuration. |
aselo-webchat-react-app/src/react-app-env.d.ts |
Removes the obsolete React Scripts declaration file. |
aselo-webchat-react-app/package.json |
Replaces CRA dependencies and scripts with webpack tooling. |
aselo-webchat-react-app/config-overrides.js |
Removes the legacy rewired overrides. |
Review effort: Balanced
| const webpack = require('webpack'); | ||
| const dotenv = require('dotenv'); | ||
|
|
||
| dotenv.config(); |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@copilot -Remove any references to cypress in the tsconfig file for aselo-webchat-react-app and fix the typescript issues in the test code that now break the build. Make minimal changes to get the checks passing |
|
@copilot resolve the merge conflicts in this pull request |
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Removed the Cypress paths and types from the webchat tsconfig, fixed the test fixture typing issues, and verified the production build, lint, and all 459 unit tests pass. Changes are in |
…t-app-rewired # Conflicts: # aselo-webchat-react-app/package-lock.json # aselo-webchat-react-app/package.json Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Merged |
|
@copilot regenerate the package-lock.json file in aselo-webchat-react-app to fix the conflicts by running npm install |
Ran |


Description
Replace the webchat app’s outdated
react-app-rewiredsetup with direct webpack configuration while preserving its build outputs and environment behavior.webchat.min.jsbundle, public assets, environment constants, and CDN copy atdist/cdn/webchat.min.js.react-app-rewiredandreact-scripts; add the required webpack tooling.{ "start": "webpack serve --mode development", "build": "webpack --mode production" }Checklist
Other Related Issues
None
Verification steps
npm run startto launch the webchat development server.npm run buildand confirm the bundle is generated atbuild/static/js/webchat.min.jsand copied todist/cdn/webchat.min.js.AFTER YOU MERGE
You are responsible for ensuring the above steps are completed. If you move a ticket into QA without advising what version to test, the QA team will assume the latest tag has the changes. If it does not, the following confusion is on you! :-P