Skip to content

jason2506/postcss-js-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PostCSS JS Loader for Webpack

Installation

$ npm install --save-dev postcss-js-loader

Usage

Documentation: Using loaders

Example Webpack Configuration

export default {
  module: {
    loaders: [
      {
        test: /\.css\.js$/,
        loader: 'style!css!postcss-js',
      },
    ],
  },
}

Integration with Babel Loader

export default {
  module: {
    loaders: [
      {
        test: /\.css\.js$/,
        loader: 'style!css!postcss-js!babel',
      },
    ],
  },
}

Integration with CSS Modules

export default {
  module: {
    loaders: [
      {
        test: /\.css\.js$/,
        loader: 'style' +
          '!css?modules&importLoaders=1' +
          '!postcss-js'
      },
    ],
  },
}

Integration with PostCSS Plugins

import autoprefixer from 'autoprefixer'

export default {
  module: {
    loaders: [
      {
        test: /\.css\.js$/,
        loader: 'style!css!postcss-js',
      },
    ],
  },

  postcss: [autoprefixer],
}

About

PostCSS JS loader for Webpack.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published