1.3.2 • Published 1 year ago

sass-migrator-loader v1.3.2

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Sass-Migrator Loader

This is a webpack (^4.0.0 || ^5.0.0) loader alternative to cli sass-migrator (NPM) 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

npm install sass-migrator-loader --save-dev

Usage

// 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

NameTypeDefaultDescription
migrationsstring[]['division']list of migrations to apply, you can remove irrelevant once for better performance
flagsstring[][]list of flags to apply
nodeModulesPrefixstring~prefix for node_modules imports
srcPrefixstring''prefix for node_modules imports
1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.0.0

1 year ago