vue-svg-icon | 基于 Svg sprite 的svg icon方案实践 | Animation library
kandi X-RAY | vue-svg-icon Summary
kandi X-RAY | vue-svg-icon Summary
基于 Svg sprite 的svg icon方案实践
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of vue-svg-icon
vue-svg-icon Key Features
vue-svg-icon Examples and Code Snippets
Community Discussions
Trending Discussions on vue-svg-icon
QUESTION
I am trying to get Webpack 4 to output a .png file into /dist/assets, and have that be used by my index.html file via file-loader.
The .png file does output into dist/assets, but it does not get loaded in by the browser. Funny thing, I treat my .png files the same as my font files in my webpack.config.js, and the font files are loaded in by the browser.
Below is my file directory when building
Below is code from webpack.config.js that I believe to be pertinent to this issue.
...ANSWER
Answered 2018-Jun-28 at 07:44I tried it out, and it works fine with just a minor detail.
I think the real magic here is how wepback-dev-server finds your index.html, and if anything I think that should break. Anyway:
Your build (npm run prod
--> webpack --mode production
) creates all the right files, but there are no changes to index.html, and there is no index.html generated in your dist-folder. Usually you copy index or generate from a template for cache-busting (copy-webpack-plugin / html-webpack-plugin) but for now I just copied index.html to the dist folder manually.
Of course now the index pointed at the the wrong assets so I updated:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install vue-svg-icon
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page