Giter VIP home page Giter VIP logo

Comments (5)

HiuYanChong avatar HiuYanChong commented on May 27, 2024 1

搜了一下代码,这个好像自定义不了

内置 url-loader 的 name 选项 读取 this.webpackInfo.imageName

this.webpackInfo.imageName 赋值逻辑在这里

所以如果需要带 hash,在 webpack.config.js 里面设置 imageHash: true 就可以了

from easywebpack.

hubcarl avatar hubcarl commented on May 27, 2024

@webaifei 临时办法,可以禁用urlimg,然后自己配一个或者customize里面处理一下

from easywebpack.

hubcarl avatar hubcarl commented on May 27, 2024

@HiuYanChong 看看是否可以覆盖配置,如果可以,可以提个pr

from easywebpack.

HiuYanChong avatar HiuYanChong commented on May 27, 2024

@hubcarl OK, 我瞧瞧,一并梳理下哪些内置 loader 存在这个问题吧

from easywebpack.

webaifei avatar webaifei commented on May 27, 2024

@hubcarl
👌 已经使用如下代码解决问题

customize(webpackConfig){ // 此外 webpackConfig 为原生生成的 webpack config
    webpackConfig.module.rules[4].use[0].options.name = 'img/[contenthash].[ext]';
    return webpackConfig;
  }

from easywebpack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.