Skip to content

Replace react-app-rewired with webpack in webchat - #4831

Open
stephenhand with Copilot wants to merge 6 commits into
masterfrom
copilot/remove-react-app-rewired
Open

stephenhand with Copilot wants to merge 6 commits into
masterfrom
copilot/remove-react-app-rewired

Conversation

Copilot AI commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Replace the webchat app’s outdated react-app-rewired setup with direct webpack configuration while preserving its build outputs and environment behavior.

  • Build and development: Use webpack CLI for production builds and the webpack dev server.
  • Preserved behavior: Keep the single webchat.min.js bundle, public assets, environment constants, and CDN copy at dist/cdn/webchat.min.js.
  • Dependencies: Remove react-app-rewired and react-scripts; add the required webpack tooling.
{
  "start": "webpack serve --mode development",
  "build": "webpack --mode production"
}

Checklist

  • Corresponding issue has been opened
  • New tests added
  • Feature flags added
  • Strings are localized
  • Tested for chat contacts
  • Tested for call contacts

Other Related Issues

None

Verification steps

  • Run npm run start to launch the webchat development server.
  • Run npm run build and confirm the bundle is generated at build/static/js/webchat.min.js and copied to dist/cdn/webchat.min.js.

AFTER YOU MERGE

  1. Cut a release tag using the Github workflow. Wait for it to complete and notify in the #aselo-deploys Slack channel.
  2. Comment on the ticket with the release tag version AND any additional instructions required to configure an environment to test the changes.
  3. Only then move the ticket into the QA column in JIRA

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

Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove react-app-rewired from aselo-webchat-react-app Replace react-app-rewired with webpack in webchat Nov 9, 2026
Copilot AI requested a review from stephenhand November 9, 2026 12:09
@stephenhand
stephenhand requested a review from gpaoloni November 9, 2026 15:17
@stephenhand
stephenhand marked this pull request as ready for review November 9, 2026 15:17
Copilot AI balanced review requested due to automatic review settings November 9, 2026 15:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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();
stephenhand and others added 2 commits November 10, 2026 10:31
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>
@stephenhand

Copy link
Copy Markdown
Collaborator

@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

@stephenhand

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request

Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>

Copilot AI commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

@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 che...

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 931feea.

…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>

Copilot AI commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Merged master and resolved the package.json and lockfile conflicts while retaining the webpack setup. Merge commit: becff8ade.

@stephenhand

Copy link
Copy Markdown
Collaborator

@copilot regenerate the package-lock.json file in aselo-webchat-react-app to fix the conflicts by running npm install

Copilot AI commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot regenerate the package-lock.json file in aselo-webchat-react-app to fix the conflicts by running npm install

Ran npm install in aselo-webchat-react-app. It completed successfully and confirmed the existing lockfile is already in sync with the merged manifest, so npm made no further package-lock.json changes and there’s no new commit. The production build passes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove react-app-rewired from aselo-webchat-react-app

4 participants