isomorphic-style-loader icon indicating copy to clipboard operation
isomorphic-style-loader copied to clipboard

Use on .less files

Open vislogurov opened this issue 6 years ago • 4 comments

Hi, folks! Do you have any ideas how to use this loader on .less styles? Is it even possible?

vislogurov avatar May 04 '18 07:05 vislogurov

Just use less loader in front of it, for example:

rules: [
  // Convert CSS into JS module
  {
    test: /\.(css|less|styl|scss|sass|sss)$/,
    loader: 'isomorphic-style-loader',
  },

  // any other css loaders here

  // Compile Less to CSS via https://github.com/webpack-contrib/less-loader
  {
    test: /\.less$/,
    loader: 'less-loader',
  },
]

frenzzy avatar May 04 '18 09:05 frenzzy

@frenzzy It is not working? Can you please all step? Thank you.

nisargrthakkar avatar Jul 17 '18 05:07 nisargrthakkar

It works fine, all you need is in the example above. Another example is here: react-starter-kit/tools/webpack.config.js

frenzzy avatar Jul 17 '18 08:07 frenzzy

@frenzzy Thank you for your quick replay. Yes I have added that but this does compile and run less css

nisargrthakkar avatar Jul 17 '18 08:07 nisargrthakkar