Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

semantic-ui-react-less-loader

gadyonysh46MIT0.2.0

Webpack loader for semantic-ui-react: add styles from semantic-ui-less to semantic-ui-react components

webpack, loader, semantic-ui-react, semantic-ui-less

readme

semantic-ui-react-less-loader

Webpack loader for semantic-ui-react: add styles from semantic-ui-less to semantic-ui-react components Can be used with semantic-ui-less-module-loader.

Usage

Installation

npm install semantic-ui-react semantic-ui-less --save-dev
npm install semantic-ui-react-less-loader --dev

Configuration

Add loader for semantic-ui-react components in your webpack config:

module: {
  loaders: [
    {
      test: /\.jsx?$/,
      loader: 'babel!semantic-ui-react-less-loader',
      include: [/node_modules[\/\\]semantic-ui-react/]
    }
],

Use semantic-ui-react components in your code like this

import React from 'react';
import { render as renderDom } from 'react-dom';
import Button from 'semantic-ui-react';

const container = document.createElement('div');

document.body.appendChild(container);

renderDom(
  <Button>Click me</Button>,
  container
);