Answer the question
In order to leave comments, you need to log in
Enable inline background webpack?
There is such a div with an inline background style! how to connect it so that webpack can see it!
<div style="background-image: url('./img/somthing-image.jpg') "></div>
img(src=require("../img/somthing-image.jpg"))
Answer the question
In order to leave comments, you need to log in
Parse and send JSON - this will be the right option. Example :
var array = [1, 2, 3];
localStorage.setItem("array", JSON.stringify(array));
array = JSON.parse(localStorage.getItem("array"));
console.log(typeof array); //object
console.log(array); //[1, 2, 3]
To do this, you need to set the url as follows:
At the same time, use the interpolate flag in the webpack config:
{
test: /\.html$/,
use: ['html-loader?interpolate']
},
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question