Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Jinjiang/px2rem-loader
Webpack loader for px2rem css file
https://github.com/Jinjiang/px2rem-loader
Last synced: about 1 month ago
JSON representation
Webpack loader for px2rem css file
- Host: GitHub
- URL: https://github.com/Jinjiang/px2rem-loader
- Owner: Jinjiang
- Archived: true
- Created: 2015-06-19T19:12:50.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-04-26T09:10:00.000Z (over 3 years ago)
- Last Synced: 2024-10-02T12:47:55.206Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 57.6 KB
- Stars: 204
- Watchers: 7
- Forks: 33
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-star - px2rem-loader
README
# px2rem-loader
a [webpack](http://webpack.github.io/) loader for [px2rem](https://github.com/songsiqi/px2rem)
[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]
[![Downloads][downloads-image]][downloads-url][npm-image]: https://img.shields.io/npm/v/px2rem-loader.svg
[npm-url]: https://npmjs.org/package/px2rem-loader
[travis-image]: https://img.shields.io/travis/Jinjiang/px2rem-loader.svg
[travis-url]: https://travis-ci.org/Jinjiang/px2rem-loader
[downloads-image]: http://img.shields.io/npm/dm/px2rem-loader.svg
[downloads-url]: https://npmjs.org/package/px2rem-loader## 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](https://github.com/songsiqi/px2rem) for more information about query parameters of px2rem.
## Example
See an example [here](./examples).