Skip to content

Latest commit

 

History

History
executable file
·
47 lines (39 loc) · 1.16 KB

README.md

File metadata and controls

executable file
·
47 lines (39 loc) · 1.16 KB

rpx2rem-loader

a webpack loader for rpx2rem

NPM version Build status Downloads

Install

npm install rpx2rem-loader

webpack config

module.exports = {
  // ...
  module: {
    rules: [{
      test: /\.css$/,
      use: [{
        loader: 'style-loader'
      }, {
        loader: 'css-loader'
      }, {
        loader: 'rpx2rem-loader',
        // options here
        options: {
          remUnit: 100,
          remTag: 'rem',
          remPrecision: 6,
        }
      }]
    }]
  }
}

thanks

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