webpack-bundle

Html-loader + file-loader not bundling the correct image source

廉价感情. 提交于 2021-02-11 15:12:59
问题 I'm planning to use Webpack for a project and I'm setting up my workflow with Html-loader + file-loader to get a production html file with dynamic src for the images, as Colt Steele teaches in this video. Here are my src/ files: index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Popular on Letterboxd</title> </head> <body> <img src="./assets/chira.jpg" /> </body> </html> index.js: import img from './assets/chira.jpg'; import "./main.css"; And main.css body {

Html-loader + file-loader not bundling the correct image source

核能气质少年 提交于 2021-02-11 15:11:58
问题 I'm planning to use Webpack for a project and I'm setting up my workflow with Html-loader + file-loader to get a production html file with dynamic src for the images, as Colt Steele teaches in this video. Here are my src/ files: index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Popular on Letterboxd</title> </head> <body> <img src="./assets/chira.jpg" /> </body> </html> index.js: import img from './assets/chira.jpg'; import "./main.css"; And main.css body {