Skip to content

chore: remove universal-hot-reload and webpack-serve from examples#403

Closed
kparkinson-ld wants to merge 2 commits into
mainfrom
devin/1780948735-remove-universal-hot-reload
Closed

chore: remove universal-hot-reload and webpack-serve from examples#403
kparkinson-ld wants to merge 2 commits into
mainfrom
devin/1780948735-remove-universal-hot-reload

Conversation

@kparkinson-ld

@kparkinson-ld kparkinson-ld commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

Resolves Dependabot alerts #250, #249 (uuid), #248, #247 (webpack-dev-server).

Describe the solution you've provided

Removes universal-hot-reload and webpack-serve from both example apps' devDependencies. These packages pulled in vulnerable transitive deps (webpack-dev-server@3.x, uuid@3.4.0, node-forge@0.10.0).

Replaces with explicit webpack CLI build scripts:

  • npm run build — compiles client + server bundles via webpack CLI
  • npm start — builds then runs the server bundle

HMR is removed since these examples are for a deprecated SDK.

Describe alternatives you've considered

Upgrading universal-hot-reload to a version that uses webpack-dev-server@5 would require also upgrading to webpack 5, which is a larger migration.

Additional context

This is one of two follow-up PRs to #401. The other is #402 (react-router-dom v5→v6).

Link to Devin session: https://app.devin.ai/sessions/381e0dd095a446e49ba0e8a9c9022c0c
Requested by: @kparkinson-ld


Note

Low Risk
Dev-only example tooling and scripts; no SDK or production runtime behavior changes.

Overview
Removes universal-hot-reload and webpack-serve from the example apps (async-provider, hoc) to drop vulnerable transitive dependencies. Example workflows now use npm run build (webpack CLI for client + server) and npm start (build then node dist/serverBundle.js); the serve script is gone and HMR is no longer used.

Server bootstrapping is simplified: src/server/index.js only requires the compiled dist/serverBundle instead of wiring hot reload. Client assets are served from the same Express app via /dist/bundle.js (replacing a separate dev-server URL), with webpack publicPath set to /dist/.

Reviewed by Cursor Bugbot for commit c2b3f2b. Bugbot is set up for automated code reviews on this repo. Configure here.

Remove universal-hot-reload and webpack-serve devDependencies from both
example apps. These packages pulled in vulnerable transitive deps:
- webpack-dev-server@3.x (GHSA-9hcv-j9pv-qmph)
- uuid@3.4.0 (GHSA-rr56-j5qj-qrhg)
- node-forge@0.10.0 (multiple CVEs)

Replace with explicit webpack CLI build scripts. The examples now use
'npm run build' to compile client/server bundles and 'npm start' to
build and run the server. Hot module replacement is removed as these
examples are for a deprecated SDK.
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@kparkinson-ld kparkinson-ld marked this pull request as ready for review June 8, 2026 20:04
@kparkinson-ld kparkinson-ld requested a review from a team as a code owner June 8, 2026 20:04

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 22a56e9. Configure here.

"scripts": {
"start": "NODE_OPTIONS=--openssl-legacy-provider node src/server/index.js",
"build": "NODE_OPTIONS=--openssl-legacy-provider webpack --config webpack.config.client.js && NODE_OPTIONS=--openssl-legacy-provider webpack --config webpack.config.server.js",
"start": "npm run build && node dist/serverBundle.js",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Client script port no longer served

High Severity

The updated start script only builds assets and runs dist/serverBundle.js on port 3000. The server HTML still requests bundle.js from http://localhost:3002, which webpack-serve used to provide. With that dev server removed, nothing listens on 3002, so the example page renders without client JavaScript.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 22a56e9. Configure here.

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.

Good catch — fixed in c2b3f2b. Updated both server.js HTML templates to use /dist/bundle.js (served by Express on the same port) and removed the stale localhost:3002 webpack publicPath from both webpack.config.client.js files.

The HTML templates and webpack configs referenced http://localhost:3002
which was served by the now-removed webpack-serve. Update to use
relative /dist/ path since Express already serves static files from
the dist directory on the same port.
@joker23

joker23 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

since these are examples, we do not need to bump a patch version. The PR title should be prefixed with chore instead of fix

@devin-ai-integration devin-ai-integration Bot changed the title fix: remove universal-hot-reload and webpack-serve from examples chore: remove universal-hot-reload and webpack-serve from examples Jun 8, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

Good call — updated the title to chore: on both this PR and #402 since they only touch examples.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants