cssx-loader

5.2.1 • Public • Published

cssx-loader

A CSSX loader for webpack.

Usage

Install the loader with npm i cssx-loader -D and then add it to your webpack.config.js file:

var webpack = require('webpack');
 
module.exports = {
  entry: '...',
  devtool: 'source-map',
  output: {
    path: '...',
    filename: 'bundle.js'
  },
  cssx: {
    minify: false
  },
  module: {
    loaders: [
      {
        test: /(\.js)$/,
        loader: 'cssx-loader',
        exclude: /node_modules/
      }
    ]
  }
};
 

If you use cssx-loader along with React make sure that you place it at the end of the loaders array. It's important that you get the CSSX <style> tags resolved first, before they reach the JSX transpiler.

Notice that if you need to pass settings to the transpiler you have to use cssx property of the webpack's configuration.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i cssx-loader

    Weekly Downloads

    3

    Version

    5.2.1

    License

    MIT

    Last publish

    Collaborators

    • krasimir