I used the background-image attribute in sass and referenced several images in the same way. The image storage paths are all under assets/images/, some are rendered in the foreground / static/img/, some are in base64 format, why?
I used the background-image attribute in sass and referenced several images in the same way. The image storage paths are all under assets/images/, some are rendered in the foreground / static/img/, some are in base64 format, why?
whether you packaged it with vue-cli , this tool will replace the resource path (you can change it in the configuration file, please refer to the documentation for details).
as for the path change base64 , it should be the compress resource switch of what plug-in or something you have (I don't know whether vue-cli has this function or whether it is enabled by default). After all, the direct output of small images BASE64 can reduce the number of resource requests to reduce traffic pressure.
Images placed under assets will be compiled by webpack, while files placed under static will not be compiled
in fact, this should belong to the difference between src folder and static folder
base64 is made by vue scaffolding. How many files smaller than this will be converted to base64,? if you remember correctly, it should be 8kb
.Previous: Sys in python
Next: Implementation of selecting all in the drop-down box of bootstrap-table display column
scss, is used in the vue project and then there is a global scss file, but when referencing, you always have to use relative positioning to successfully refer to it. You can t see why when you look at sass-loader documents. I d like to ask ~ ~ how to b...
for example, how to answer this interview question ...
...
node-sasssass-loaderstyle-loaderwebpack.base.conf if lang= "scss " is introduced into the style tag of home.vue on the home page, it will report an error. It is very confusing . ...
use webpack 4.6.0 + React + React-router (with react-loadable) to load on demand, compress CSS when packaging and compiling in production environment, and sometimes multiple packages can be completed, but the packaged CSS is not compressed, and some CS...
recently created a project using create-react-app, and because of the variety of project themes, multiple style files are required for style definition. The original idea of is to define a css file, which is introduced where you need to use it through...
1. Because the page uses a template engine three times, ajax requests data from the same interface three times. 2. Since they all belong to the same interface, I want to request the interface once and cache the data, and then let the template engine get...
******vuecheck-version.jsCannot read property node of undefined****** versionRequirement: packageConfig.engines.node ^ TypeError: Cannot read property node of undefined at O...
how to successfully compile scss using lib-flexible px2rem in the vue-cli environment scss is written in the .vue file and configured build utils.js <style lang="scss"> $c:pink; .test{ width:200px; height:200...
data percentage chart what are the ideas for this realization? ...
Super 360 browser clicks on an input box (not on the landing page, login is completed to enter a page), and a small white box appears (using the password of:) login account only 360 appears, and no similar problems are found in the others. The followi...
want to concatenate variable names in a loop want the following results .color01{ border-color: -sharp137ae9; background-color:-sharp137ae9; } .color02{ border-color: -sharp30a66a; background-color:-sharp30a66a; } ... I have some col...