cssnext-loaderdeprecated

webpack loader for cssnext

Usage no npm install needed!

<script type="module">
  import cssnextLoader from 'https://cdn.skypack.dev/cssnext-loader';
</script>

README

cssnext-loader Build Status

a webpack loader for cssnext

install

$ npm install cssnext-loader

api

cssnext

in your webpack.config.js

module.exports = {
  entry: "path/to/entry",
  output: {
    path: "path/to/output/",
    filename: "bundle.js"
  },
  cssnext : {
    features : {
      import : {
        path : ["src/assets/stylesheets"]
      }
    }
  }
}

in your js file :

var css = require("style-loader!css-loader!../..!./file.css")

you can also configure webpack so that it always parses CSS files like this :

module: {
  loaders: [
    {
      test:   /\.css$/,
      loader: "style-loader!css-loader!cssnext-loader"
    }
  ]
}

changelog

license