px2rpx-loader a webpack loader for px2rpx Install npm install px2rpx-loader webpack config { loaders: [{ test: /\.css$/, loader: 'style!css!px2rpx?rpxUnit=75&rpxPrecision=8' }] } Please see px2rpx for more information about query parameters of px2rpx.