Skip to content

Conversation

@AugustoL
Copy link
Collaborator

@AugustoL AugustoL commented Jan 16, 2026

Description

Fix browser cache conflicts when switching between different explorer builds (e.g., hardhat plugin explorer vs current version) by adding content hashes to chunk filenames.

Related Issue

N/A

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactoring
  • Performance improvement
  • Other (please describe):

Changes Made

  • Add chunkFilename with [contenthash] to webpack output config
  • Add [contenthash] to production bundle filename
  • Only minimize in production mode for faster dev builds
  • Add sleep before ignition deploy in test env script for reliability

Screenshots (if applicable)

N/A

Checklist

  • I have run npm run format:fix and npm run lint:fix
  • I have run npm run typecheck with no errors
  • I have run tests with npm run test:run
  • I have tested my changes locally
  • I have updated documentation if needed
  • My code follows the project's architecture patterns

Additional Notes

When switching between different explorer builds on the same port, the browser serves cached chunks from the old build. Since module IDs differ between builds, this causes "Cannot find module" errors. Using [contenthash] ensures each build produces uniquely named files - same code = same hash (deterministic), different code = different hash (no cache conflicts).

- Add chunkFilename with contenthash to prevent browser cache conflicts
  between different explorer builds (e.g., hardhat plugin vs current)
- Only minimize in production for faster dev builds
- Add sleep before ignition deploy in test env script
@AugustoL AugustoL requested a review from MatiasOS January 16, 2026 13:56
@github-actions
Copy link

🚀 Preview: https://pr-153--openscan.netlify.app
📝 Commit: e9c2cbc3450e64953f502f5ba52c8d8bdefd5e04

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.

1 participant