Skip to content

Latest commit

 

History

History
45 lines (37 loc) · 1.15 KB

README.md

File metadata and controls

45 lines (37 loc) · 1.15 KB

px2rpx-loader

a webpack loader for px2rpx

NPM version Build status Downloads

Install

npm install px2rpx-loader

webpack config

module.exports = {
  // ...
  module: {
    rules: [{
      test: /\.css$/,
      use: [{
        loader: 'style-loader'
      }, {
        loader: 'css-loader'
      }, {
        loader: 'px2rpx-loader',
        // options here
        options: {
          rpxUnit: 1,
          rpxPrecision: 6
        }
      }]
    }]
  }
}

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