I’m using Webpack (v.5.92.0) with Node.js (v.20) and when I import a module which I forget to include into html with <script>
tag (I don’t use generating html file) then I don’t get any error about missing JS module.
Is there a way to make the JS bundle more verbose to make an error/warning/notice about missing imported file?
Example of entry point file main.js
:
import _ from "lodash";
console.log(_);
DevTools Console after run main.js
after not including <script src="lodash.js"></script>
:
I tried dynamic imports – it’s working very well but it’s not helpful in every case .
I expect an error message in DevTools Console when there’s missing a module.
I don’t expect CLI logging/debugging while building a bundle.