@speedy/sass-loader
A faster Webpack SASS Loader
Last updated 3 years ago by speedy .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @speedy/sass-loader 
SYNC missed versions from official npm registry.

@speedy/sass-loader

npm version dependencies Status devDependencies Status

A faster Webpack SASS Loader.

This is a drop in replacement for SASS Loader It is highly simplified in order to improve build times on large application with a lot of SASS imports.

This has mainly been developed for "legacy" SASS architecture, ie: SASS is not required within a JS file. However this doesn't mean it will not work with modern architectures.

Install

npm install @speedy/sass-loader node-sass webpack --save-dev

Examples

// webpack.config.js
module.exports = {
  entry: {
    "app.mobile": "./src/apps/app/app.scss"
  },
  module: {
      rules: [{
          test: /\.scss$/,
          loader: "@speedy/sass-loader" // compiles SASS to CSS
      }]
  }
};

Usually, it's recommended to extract the style sheets into a dedicated file in production using the ExtractTextPlugin. This way your styles are not dependent on JavaScript:

// webpack.config.js
const ExtractTextPlugin = require("extract-text-webpack-plugin");

module.exports = {
  entry: {
    "app.mobile": "./src/apps/app/app.scss"
  },

  module: {
    rules: [
      {
        test: /\.scss$/,
        use: ExtractTextPlugin.extract({
          use: [
            {
              loader: "@speedy/sass-loader",
              options: {
                includePaths: ["./src/assets/sass"]
              }
            }
          ]
        })
      }
    ]
  },

  plugins: [
    new ExtractTextPlugin({
      filename: "[name].css",
      allChunks: true
    })
  ]
};

Current Tags

  • 1.2.0                                ...           latest (3 years ago)

5 Versions

  • 1.2.0                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 0.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (2)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |