Registry / devops / rollup-plugin-sass-migrator

rollup-plugin-sass-migrator

JSON →
library1.0.5jsnpmunverified

Rollup/Vite plugin to run the sass-migrator tool on SASS files during development and build, primarily to eliminate deprecation warnings from the SASS compiler. Version 1.0.5 (stable) has a peer dependency on sass-migrator ^1. Designed to simplify automatic migration by integrating into the build pipeline, with special support for Quasar projects via a convenience function. Unlike manual migration, it automates migration on every build, ensuring existing warnings are resolved.

npm install rollup-plugin-sass-migrator
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-SASS
R
rollup-plugin-sass-migrator
devopsjavascriptv1.0.5
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sassMigrator
import { sassMigrator } from 'rollup-plugin-sass-migrator'
import sassMigrator from 'rollup-plugin-sass-migrator'
Named export, not default. Available in ES modules.
sassMigratorQuasar
import { sassMigratorQuasar } from 'rollup-plugin-sass-migrator'
const sassMigratorQuasar = require('rollup-plugin-sass-migrator')
ESM-only; require will not work. This is a convenience function for Quasar projects.
sassMigrator (Rollup)
const { sassMigrator } = require('rollup-plugin-sass-migrator');
const sassMigrator = require('rollup-plugin-sass-migrator').default;
CJS destructuring works in Rollup context; do not use .default.

Basic Vite plugin setup that runs sass-migrator on a specific index SASS file, with debug and dry run flags.

// vite.config.js import { defineConfig } from 'vite'; import { sassMigrator } from 'rollup-plugin-sass-migrator'; export default defineConfig({ plugins: [ sassMigrator({ indexPath: 'node_modules/quasar/src/css/index.sass', debug: false, dryRun: false, }) ] });
Debug
Known issues
breakingPeer dependency 'sass-migrator' is required but may be missing if not installed.
fix
Install peer dependency: npm install -D sass-migrator or yarn add -D sass-migrator
affects: >=1.0.0
gotchaPlugin only supports ESM imports; CommonJS require may fail in some setups.
fix
Use import syntax or ensure your build tool handles CJS require of ESM packages (e.g., using a bundler like Rollup).
affects: >=1.0.0
gotchaThe plugin does not automatically detect sass-migrator configuration; you must specify indexPath or use the Quasar convenience function.
fix
Pass either indexPath option to sassMigrator or use sassMigratorQuasar() for Quasar projects.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'sass-migrator'
Missing peer dependency sass-migrator
fix
npm install -D sass-migrator
TypeError: sass_migrator is not a function
Importing default export instead of named export
fix
Use import { sassMigrator } from 'rollup-plugin-sass-migrator'
Upgrade
Version history
1.0.5latest on npm
Audit
Dependencies
sass-migratorrequiredPeer dependency; the plugin runs the sass-migrator CLI tool.
Agent activity
4 hits · last 30 days
node
4
Resources
rollup-plugin-sass-migrator — npm install rollup-plugin-sass-migrator · libregistry