Yolan Mazars
Yolan Mazars

Reputation: 61

How to configure WebPack only for SASS to CSS

I'm very noob with WebPack

I try to find the simplest configuration code for using it to tranform a sass file to a css file

Someone could give me a sample?

Upvotes: 2

Views: 1382

Answers (1)

highFlyingSmurfs
highFlyingSmurfs

Reputation: 3039

Get sass-loader

Then add this in your config

  module: {
    loaders: [
      {
        test: /\.scss$/,
        loaders: ["style", "css", "sass"]
      }
    ]
  }

After that you can require your scss files like this

require("./styles.scss").

Upvotes: 3

Related Questions