search

Home  >  Q&A  >  body text

node.js - npm有没有可以检索图片,并把图片数据保存到js或者json里的包

想用webpack去做一个自动化的东西,想把html,css,js中用到的图片检索到json或者js中保存,js中调变量,其他的调路径或者data-url,大神门有没有什么好的建议

高洛峰高洛峰2864 days ago652

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-04-17 15:00:41

    url-loader converts images into DataUrl. After you define it in the webpack configuration file, it can be used in html/css/js, but the usage is different. For usage in js/css, you can see here Article "webpack multi-page application architecture series (6): I heard that webpack can also package images and fonts?" 》

    reply
    0
  • Cancelreply