I am writing vanilla Javascript but using the Typescript compiler's checkJs option to do type checking in VSCode. I have Webpack set up to load various asset types (CSS, images, etc), which works fine for builds, but Code is treating these statements as an error. For example, in this code
require("bootstrap");
require("bootstrap/dist/css/bootstrap.css");
var img = require("../img/image.png");
the first line is fine but the next two both show an error under the (string) argument to require(), with the tooltip "Cannot find module (name)".
I have installed @types/webpack and @types/webpack-env, which fixed resolve() and resolve.context(). Am I missing another typings package or is this an issue I need to take up on the DT issue tracker?
//@ts-ignoreso I'm trying to fix it "correctly"