Skip to content

chore(webpack): add GLSL import tracker loader to track import dependencies in --watch mode #5437

Open
Strepto wants to merge 2 commits intocognitedata:masterfrom
equinor:nih/feat/glslify-webpack-watching
Open

chore(webpack): add GLSL import tracker loader to track import dependencies in --watch mode #5437
Strepto wants to merge 2 commits intocognitedata:masterfrom
equinor:nih/feat/glslify-webpack-watching

Conversation

@Strepto
Copy link
Contributor

@Strepto Strepto commented Oct 31, 2025

Type of change

Chore

Jira ticket 📘

N/A

Description 📝

When changing shader file dependencies today you need to manually rebuild changes as webpack watch does not track dependencies for glslify imports. This PR adds a custom webpack loader to track imports.

If this change is not needed feel free to dismiss this PR.

How has this been tested? 🔍

Tested in local development, works.

The loader does not mutate the files so there should be no runtime or build-time changes

Test instructions ℹ️

Start viewer with yarn build:watch and change a .glsl file (for example updateFragmentColor.glsl) and see that webpack now will auto-rebuild.

Checklist ☑️

  • I am happy with this implementation.
  • I have performed a self-review of my own code.
  • I have added unit and visuals tests to prove that my feature works to the best of my ability.
  • I have added documentation to new and changed elements; both public and internally shared ones
  • I have refactored the code for testability, readability and extendibility to the best of my ability.
  • I have listed the JIRA tasks covering remaining work or tech debt related to this PR in the description.

@Strepto Strepto requested a review from a team as a code owner October 31, 2025 10:54
@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

❌ Patch coverage is 0% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.65%. Comparing base (715bce4) to head (ea13e90).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
viewer/packages/webpack.config.js 0.00% 13 Missing ⚠️
viewer/webpack.config.js 0.00% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5437      +/-   ##
==========================================
+ Coverage   70.62%   70.65%   +0.03%     
==========================================
  Files        1222     1224       +2     
  Lines       84723    84904     +181     
  Branches     9012     9031      +19     
==========================================
+ Hits        59833    59988     +155     
- Misses      24752    24778      +26     
  Partials      138      138              
Files with missing lines Coverage Δ
viewer/packages/webpack.config.js 0.00% <0.00%> (ø)
viewer/webpack.config.js 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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