postcss-js-loader

0.1.2 • Public • Published

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],
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    0
  • 0.1.1
    3

Package Sidebar

Install

npm i postcss-js-loader

Weekly Downloads

3

Version

0.1.2

License

MIT

Last publish

Collaborators

  • jason2506