Webpack loader for px2rem css file
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
lib
.gitignore
.travis.yml feat: update loader utils, change parseQuery to getOptions (#9) Mar 21, 2018
README.md
index.js first dev version Jun 19, 2015
package-lock.json
package.json 0.1.9 Apr 1, 2018
test.js

README.md

px2rem-loader

a webpack loader for px2rem

NPM version Build status Downloads

Install

npm install px2rem-loader

webpack config

module.exports = {
  // ...
  module: {
    rules: [{
      test: /\.css$/,
      use: [{
        loader: 'style-loader'
      }, {
        loader: 'css-loader'
      }, {
        loader: 'px2rem-loader',
        // options here
        options: {
          remUnit: 75,
          remPrecision: 8
        }
      }]
    }]
  }
}

Please see px2rem for more information about query parameters of px2rem.

Example

See an example here.