iam4x/isomorphic-flux-boilerplate

Question: it posible build webpack with style-loader

Open

#162 opened on Dec 10, 2015

View on GitHub
 (8 comments) (0 reactions) (0 assignees)JavaScript (115 forks)github user discovery
help wantedquestion

Repository metrics

Stars
 (791 stars)
PR merge metrics
 (PR metrics pending)

Description

Hi, i use webpack style-loader just for optimize long names like "mycomponent-element-element--state-longname", and it imposible use it with this example?

My config

  {
    test: /(\.scss|\.css)$/,
    loader: ExtractTextPlugin.extract('style',
      'css?sourceMap&modules&importLoaders=1&localIdentName=[local]___[hash:base64:5]|postcss!autoprefixer-loader!sass?sourceMap')
  }

In jsx i use requre for classnames map:

import React, { Component, PropTypes } from 'react';

import style from './style'

class Stest extends Component {
  render() {
    return <div className={style['stest']}>stest text</div>
  }
}}

I must choose: or server-side rendering with "global css" and plaintext styles or power of webpack with short class names but without server-side rendering.

But I wanted to use both approaches. Anyone else encountered this problem?

Contributor guide