Socket
Book a DemoInstallSign in
Socket

img-ali-loader

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

img-ali-loader

img url process

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

img loader for webpack

installation

npm install img-loader --save-dev

Function

soooooooooo easy, just see the example below

before

.test{
  background: url(http://gtms02.alicdn.com/tps/i1/TB1BN4mJFXXXXbVXpXX4XhHIVXX-76-40.png) no-repeat 0 0;
}

after

.test{
  background: url(//img.alicdn.com/tps/i1/TB1BN4mJFXXXXbVXpXX4XhHIVXX-76-40.png_.webp) no-repeat 0 0;
}

Example config

module.exports = {
  module: {
    loaders: [
      {
        test: /\.css$/,
        loader: 'style-loader!css-loader!img-loader'

      }
    ]
  }
};

License

MIT (http://www.opensource.org/licenses/mit-license.php)

Keywords

webpack

FAQs

Package last updated on 22 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts