Closed infacq closed 8 years ago
Hi, why you use unquote() here? Are there any bugs in the console?
no bug at all. if I remove the unquote also the same
You need to be careful with the imagge paths. This is not the same as Meteor's public
folder so maybe here is the problem.
yes. I notice everything is put right under image
folder when webpack is run. So I simply place the image where I want it. Right now, the image is appear when I append ?resolve url
but it only appear on Safari
Hi, I think I know what is the problem. There is a bug in webpack style-loader when you use sourceMap
and CSS Modules. In normal situation when you want to use background file you can do something like :
background-image url('./bg.png'); /* your bg.png file is in the same folder, and you need to use './' in that case */
And it works like it should without source maps enabled. I've implemented workaround by providing full publicPath
in the dev mode.
Here is the example and it works like it should now. You can test it. If you have your image files somewhere else just use relative paths like:
background-image url('../../../path/to/images/bg.png');
Read more about background images in webpack here: https://github.com/webpack/css-loader#usage
Trying to use background-image
on discordapp.com:
Refused to load the image 'http://127.0.0.1:8888/video.svg' because it violates the following Content Security Policy directive: "img-src 'self' data: https://*.discordapp.net https://*.discordapp.com https://i.scdn.co https://i.ytimg.com https://i.imgur.com https://*.gyfcat.com https://media.tenor.co https://media.tenor.com https://*.youtube.com https://*.giphy.com https://static-cdn.jtvnw.net https://pbs.twimg.com https://assets.braintreegateway.com https://checkout.paypal.com".
I tried this
but the image won't show up. Do you mind help