We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I try add image as background, picture not showing. My code looks like this.
.bg { background-image: url('../assets/section-packets-bg.png'); }
webpack generate this url url("http://localhost:8080/../../assets/section-packets-bg.png")
The text was updated successfully, but these errors were encountered:
Hi @Silver360 , I'll take a look.
Could you meanwhile try to load it from ./assets/section-packets-bg.png ?
./assets/section-packets-bg.png
Cheers.
Sorry, something went wrong.
Hi @Silver360 , Give this a try.
npm install --save-dev resolve-url-loader
webpack.dev.js
{ // translates CSS into CommonJS loader: 'css-loader', ... }, { loader:'resolve-url-loader', option: { sourceMap: true } }, { // compiles Sass to CSS loader: 'sass-loader' .. } ...
In your sass file use a relative path. In the file structure I'm using I have an image directory under styles styles/index.scss
.bg { background-image: url('img/section-packets-bg.png'); }
Hi thanks for replay. When I try install resolve-url-loader I get this message.
@ldraminski,
That message indicated that there are vulnerabilities in the package that you installed. You can either run npm audit fix or just ignore them.
npm audit fix
Option with a S , if not it doesn't work !
{ loader:'resolve-url-loader', options: { sourceMap: true } }, {
lifenautjoe
No branches or pull requests
When I try add image as background, picture not showing. My code looks like this.
.bg { background-image: url('../assets/section-packets-bg.png'); }
webpack generate this url url("http://localhost:8080/../../assets/section-packets-bg.png")
The text was updated successfully, but these errors were encountered: