I am using webpack to bundle .vue files, which use import and export. Webpack creates a nice bundle.js and that's all fine and dandy.
BUT when my Vue file mentions an image, for example:
<div> <img src='./images/thing.png'> </div> .style { background: url('./images/anotherthing.png'); } Now, suddenly this image needs to be in my dev folder as well, and webpack wants to copy ALL my image files each and every time I update one character in one javascript file. Also, not ALL my images are imported this way, so I have to copy some files manually to the dist folder, and webpack also copies some files...
Can I tell webpack not to bundle static image files that never change? Is that even recommended?
ignore-loaderand using{ test: /\.svg$/, loader: 'ignore-loader' }I still get the errorModule not found: Error: Can't resolve './images/triangle.svg'{ test: /\.(png|svg|jpg|jpeg|gif)$/i, type: 'asset/resource' }loading-images asset/resource emits a separate file and exports the URL. Previously achievable by using file-loader. lasset-modules