https://github.com/moox/cssnext-loader
# DEPRECATED. Use postcss-loader instead.
https://github.com/moox/cssnext-loader
Last synced: about 1 year ago
JSON representation
# DEPRECATED. Use postcss-loader instead.
- Host: GitHub
- URL: https://github.com/moox/cssnext-loader
- Owner: MoOx
- License: mit
- Created: 2014-10-23T09:22:06.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-01-04T07:34:26.000Z (over 10 years ago)
- Last Synced: 2025-03-27T04:12:32.553Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 43
- Watchers: 7
- Forks: 4
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# DEPRECATED. Use postcss-loader instead.
---
# cssnext-loader [](https://travis-ci.org/cssnext/cssnext-loader)
> a webpack loader for cssnext
**Issues with the output should be reported on [cssnext issue tracker](https://github.com/cssnext/cssnext/issues).**
## Install
```console
$ npm install cssnext-loader
```
## Usage
Add a cssnext section in your `webpack.config.js`
```javascript
module.exports = {
entry: "path/to/entry",
output: {
path: "path/to/output/",
filename: "bundle.js"
},
cssnext: {
browsers: "last 2 versions",
}
}
```
You can configure webpack so that it always parses CSS files like this :
```javascript
module: {
loaders: [
{
test: /\.css$/,
loader: "style-loader!css-loader!cssnext-loader"
}
]
}
```
Or, for a direct usage, in your JavaScript files :
```javascript
var css = require("style-loader!css-loader!cssnext-loader!../..!./file.css")
```
### Options
Options are directly passed to cssnext, so checkout [cssnext options](http://cssnext.io/usage/) directly.
_Note: some options are by default automatically specified._
- `from`
- `to`
- `sourcemap` (webpack `sourceMap`)
- `compress` (webpack `minimize`)
---
## [Changelog](CHANGELOG.md)
## [License](LICENSE)