Cannot enable line comments in SASS preprocessing

Created on 4 May 2023, over 1 year ago
Updated 7 June 2023, over 1 year ago

Problem/Motivation

Line comments can actually be useful when hacking on Radix β†’ , but although Laravel Mix has documentation about Sass Preprocessing, including Plugin Options, but the sassOptions config in the example below fails with an error and attempted configuration of sourceComments is apparently ignored.

<!--break-->

Steps to reproduce

In ./webpack.mix.js:

mix.sass('src/scss/main.style.scss', 'css', {
    sassOptions: {
        // This is ignored
        sourceComments: true,
        // This results in an "Unsupported output style" error
        outputStyle: 'nested',
    }
});

The config above results in the error below upon $ npm run

ERROR in ./src/scss/main.style.scss Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js): SassError: Invalid argument(s): Unsupported output style "nested".
    at processResult (/app/docroot/themes/custom/radix_theme/node_modules/webpack/lib/NormalModule.js:760:19)
    at /app/docroot/themes/custom/radix_theme/node_modules/webpack/lib/NormalModule.js:862:5
    at /app/docroot/themes/custom/radix_theme/node_modules/loader-runner/lib/LoaderRunner.js:400:11
    at /app/docroot/themes/custom/radix_theme/node_modules/loader-runner/lib/LoaderRunner.js:252:18
    at context.callback (/app/docroot/themes/custom/radix_theme/node_modules/loader-runner/lib/LoaderRunner.js:124:13)
    at Object.loader (/app/docroot/themes/custom/radix_theme/node_modules/sass-loader/dist/index.js:56:5)
πŸ› Bug report
Status

Closed: duplicate

Version

5.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States kroh San Antonio, TX

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024