You're using HMR in your app's production bundle? How?
Is it possible to generate the allowlist at development time without having the webpack plugin loaded? If it’s only generated at build time, it won’t protect against malicious packages getting installed in CI just before the build happens.
Try it and see. There's tradeoffs but if you roll it out, it is very powerful.