Skip to content

Fail Webpack builds on broken exports

Erwan Rouchet requested to merge webpack-strict-exports into master

!1516 (merged) had two broken imports after I moved some helper functions around, which I didn't notice until I saw the warnings locally with npm start while working on !1536 (merged). They are displayed in CI, but are only warnings, so they don't block anything: https://gitlab.teklia.com/arkindex/frontend/-/jobs/483731

Since JS modules are an enormous mess and there can be cases where Webpack might think you are importing something that does not exist when it actually exists, Webpack only shows warnings for its equivalent of a Python ImportError or ModuleNotFoundError. Since we at least try to do something modern enough and clean enough, we don't ever get any cases of spurious "missing exports" warnings, so that should be an error instead, and should fail in CI.

And now it does: https://gitlab.teklia.com/arkindex/frontend/-/jobs/483993

Merge request reports

Loading