The `liferay-npm-bundler-loader-sass-loader` is a specialized loader designed for the Liferay npm bundler ecosystem. Its primary function is to process Sass (`.scss` or `.sass`) source files, compiling them into standard CSS (`.css`) for deployment and browser consumption. The package, currently at version 2.32.2, is part of the actively maintained `liferay-frontend-projects` monorepo, which sees regular updates across its various components. This loader automatically changes file extensions during the build process to ensure correct serving. It prioritizes `node-sass` if available in the project, falling back to `sass` (Dart Sass), and finally using a bundled `sass` copy if neither is found. Its key role is to seamlessly integrate Sass pre-processing into Liferay's module bundling workflow.
npm install liferay-npm-bundler-loader-sass-loaderVerified import paths — ran on the pinned version, not inferred.
Installs the Sass loader and configures Liferay's npm bundler to process `.scss` and `.sass` files into CSS.
Explicitly install `sass` (Dart Sass) and ensure `node-sass` is not present in your `package.json` if you intend to exclusively use Dart Sass. Remove unwanted Sass compiler dependencies from your project.
Migrate from `node-sass` to `sass` (Dart Sass) by uninstalling `node-sass` and installing `sass` (`npm install --save-dev sass`) in your project.
Consult the `liferay-frontend-projects` monorepo's overall changelog and release notes for comprehensive information regarding updates, potential breaking changes, and cross-package impacts.
Run `npm install --save-dev liferay-npm-bundler-loader-sass-loader` in your project directory.
Install a Sass compiler: `npm install --save-dev sass` (recommended) or `npm install --save-dev node-sass` (legacy).
Carefully review your Sass source files, paying close attention to variable declarations, imports, syntax, and proper nesting to resolve the underlying compilation error.