4

i am using laravel-mix as independent installation on my project for asset management. when i run -npm run dev to compile webpack.mix.js then app.css file has formed in my output directory which is dist/app.css which is output code and below is sample rule of css as output in app.css

#welcome {
background-image: url([object Module]); // wanted path to file here   
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
overflow: hidden;
}

let see input which is in src/app.scss

#welcome {
background-image: url('../img/newfmob.webp');//this is the path to asset 
background-attachment: fixed;
background-position: center 57%;
background-repeat: no-repeat;
/*width:100%;*/
overflow: hidden;
}

After runing npm run dev all asset successfully compiled

After runing npm run dev

lets see webpack.mix.js file

mix.js('src/app.js','dist/app.js')
   .js('src/admin.js','dist/admin.js')
   .sass('src/app.scss','dist/app.css')
   .sass('src/admin.scss','dist/admin.css')
   .options({processCssUrls:true})
   .setPublicPath('dist').sourceMaps();

So what could be the reason for this matter?

0 Answers0