# sass-migrator-loader

> "# sass-migrator-loader"

Latest version **1.3.2** (published 2023-03-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install sass-migrator-loader
pnpm add sass-migrator-loader
yarn add sass-migrator-loader
bun add sass-migrator-loader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.2 |
| Published | 2023-03-27 |
| First published | 2023-03-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 10.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Andrian Kogoshvili |
| Maintainers | kogoshvili |
| Keywords | sass, migrator, sass-migrator, loader, sass-migrator-loader |

## Links

- npm: https://www.npmjs.com/package/sass-migrator-loader
- Repository: https://github.com/Kogoshvili/sass-migrator-loader
- Homepage: https://github.com/Kogoshvili/sass-migrator-loader#readme
- Issues: https://github.com/Kogoshvili/sass-migrator-loader/issues
- npm.io page: https://npm.io/package/sass-migrator-loader

## Dependencies (2)

- [loader-utils](https://npm.io/package/loader-utils.md) ^2.0.4
- [sass-migrator](https://npm.io/package/sass-migrator.md) ^1.7.3

## Recent versions

- 1.3.2 (latest) — 2023-03-27
- 1.3.1 — 2023-03-27
- 1.3.0 — 2023-03-27
- 1.2.1 — 2023-03-25
- 1.2.0 — 2023-03-24
- 1.0.0 — 2023-03-24

## README

### Sass-Migrator Loader

This is a webpack (^4.0.0 || ^5.0.0) loader alternative to cli [sass-migrator](https://sass-lang.com/documentation/cli/migrator) ([NPM](https://www.npmjs.com/package/sass-migrator)) tool.

if you have a lot of sass files and you want to migrate them to the new syntax, you should use cli tool.
However, if you have imports from node_modules then you can use this loader instead.
Loader doesn't modify original files, it just passes updated content to the next loader.

#### Installation
```bash
npm install sass-migrator-loader --save-dev
```

#### Usage
```js
// webpack.config.js
module.exports = {
  module: {
    rules: [
      {
        test: /\.s[ac]ss$/i,
        use: [
          'style-loader',
          'css-loader',
          'sass-loader',
          {
            loader: 'sass-migrator-loader',
            options: {
              // options here
            },
          },
        ],
      },
    ],
  },
};
```
**Attention!** sass-migrator-loader should be under sass-loader.

#### Options
| Name | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `migrations` | `string[]` | `['division']` | list of [migrations](https://sass-lang.com/documentation/cli/migrator#migrations) to apply, you can remove irrelevant once for better performance |
| `flags` | `string[]` | `[]` | list of [flags](https://sass-lang.com/documentation/cli/migrator#global-options) to apply |
| `nodeModulesPrefix` | `string` | `~` | prefix for node_modules imports |
| `srcPrefix` | `string` | `''` | prefix for node_modules imports |

---
_Source: https://npm.io/package/sass-migrator-loader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
