Giter Club home page Giter Club logo

Comments (4)

Robin-front avatar Robin-front commented on July 19, 2024 3

I found the method

update the [email protected]

npm install --save-dev [email protected]

then, webpack.config like this: use publicPath paramter

{ 
        test: /\.(png|jpe?g|gif)$/,
        loader: 'url-loader?publicPath=http://www.img-cdn.com/&limit=8192&name=[name]-[hash].[ext]'
      }

It will add imgs prefix, only.

if you want to add prefix in all of css, js, imgs ; you can write publicPath in output

output: {
    path: path.join(__dirname, 'dist'),
    publicPath: 'http://www.img-cdn.com/',
    filename: 'js/[name].[hash].js'
  },

from url-loader.

Robin-front avatar Robin-front commented on July 19, 2024

+1 prefix not working

from url-loader.

SukantGujar avatar SukantGujar commented on July 19, 2024

Thanks!

from url-loader.

nimoc avatar nimoc commented on July 19, 2024

Because based on file-loader so:

{
    test: /\.(png|jpg|jpeg|gif)(\?v=\d+\.\d+\.\d+)?$/i,
    loader: 'url?name=__media/[path][name][hash].[ext]'
}

name=__media/[path][name][hash].[ext]

@d3viant0ne

If don't support prefix, please delete documents related parts,thanks.

from url-loader.

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.