0

I am getting following error when I am trying to run my vue cli application. I have put my style.css file in assests folder and images in public/images folder.Then I have imported css file into main.js folder like this:"import "./assets/style.css";" Can anyone help me out. I have paste the error below. My app was working before but Its not working now.

This relative module was not found:

* ./images/beeton-small-logo.png in ./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-3-1!./node_modules/postcss-loader/src??ref--6-oneOf-3-2!./src/assets/style.css
David
  • 81
  • 10
  • You didn't show your CSS for using the image but that's where the problem is – Dan Mar 08 '20 at 19:07
  • @Dan This is my css using image: background: rgba(131, 133, 136, 0.3) url(images/beeton-small-logo.png) repeat; – David Mar 08 '20 at 19:10
  • Check [this answer](https://stackoverflow.com/a/54030632/2185093). It's probably best to move the images folder into assets and use `url('~@/assets/images/beeton-small-logo.png')` – Dan Mar 08 '20 at 19:24
  • @Dan Thanks for ur reponse. I tried but it did not work.. – David Mar 08 '20 at 19:40
  • What's the new error? Verify that there is an `images` folder inside your `assets` folder (not your `public` folder). If so, you'll need to provide more info because it should work. – Dan Mar 08 '20 at 19:44
  • I have put images like this assets/images/beeton-small-logo.png and css assets/styles/style.css. How it will work? – David Mar 08 '20 at 20:15
  • You didn't answer: what is the new error. Show your new CSS code and tell what the new error says. – Dan Mar 08 '20 at 20:20

0 Answers0