Skip to content
This repository has been archived by the owner on Aug 22, 2021. It is now read-only.

Jinjiang/px2rem-loader

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

Webpack loader for px2rem css file

Resources

Stars

Watchers

Forks

Packages

No packages published