diff --git a/README.md b/README.md index 879fc4a4..ccfe9b05 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,7 @@ Thankfully there are two solutions to this problem: - **[`additionalData`](#additionaldata)** - **[`webpackImporter`](#webpackimporter)** - **[`warnRuleAsWarning`](#warnruleaswarning)** +- **[`api`](#api)** ### `implementation` diff --git a/src/utils.js b/src/utils.js index 4ea78ce6..56464c20 100644 --- a/src/utils.js +++ b/src/utils.js @@ -189,6 +189,7 @@ async function getSassOptions( if (useSourceMap) { sassOptions.sourceMap = true; + sassOptions.sourceMapIncludeSources = true; } // If we are compiling sass and indentedSyntax isn't set, automatically set it. diff --git a/test/__snapshots__/sourceMap-options.test.js.no-node-sass.snap b/test/__snapshots__/sourceMap-options.test.js.no-node-sass.snap index 8d5ca7eb..7bb9c690 100644 --- a/test/__snapshots__/sourceMap-options.test.js.no-node-sass.snap +++ b/test/__snapshots__/sourceMap-options.test.js.no-node-sass.snap @@ -1320,6 +1320,70 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/sass/language.sass", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -1375,6 +1439,59 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -1448,6 +1565,70 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/sass/language.sass", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -1503,6 +1684,59 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -1823,22 +2057,86 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/sass/language.sass", "test/sass/another/variables.sass", ], - "version": 3, -} -`; + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" -exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "false" value ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' -exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "false" value ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} +body + font: 100% $font-stack + color: $primary-color -nav ul { - margin: 0; +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], + "version": 3, +} +`; + +exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "false" value ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; + +exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "false" value ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} + +nav ul { + margin: 0; padding: 0; list-style: none; } @@ -1878,6 +2176,59 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -1951,6 +2302,70 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/sass/language.sass", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -2006,6 +2421,59 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -2324,19 +2792,83 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/sass/language.sass", "test/sass/another/variables.sass", ], - "version": 3, -} -`; - -exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "source-map" value ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" -exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "source-map" value ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], + "version": 3, +} +`; + +exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "source-map" value ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; + +exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "source-map" value ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} nav ul { margin: 0; @@ -2379,6 +2911,59 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -2452,6 +3037,70 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/sass/language.sass", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -2507,6 +3156,59 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -2827,18 +3529,82 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/sass/language.sass", "test/sass/another/variables.sass", ], - "version": 3, -} -`; + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" -exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "source-map" value ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' -exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "source-map" value ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], + "version": 3, +} +`; + +exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "source-map" value ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; + +exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "source-map" value ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; } nav ul { @@ -2882,6 +3648,59 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -2955,6 +3774,70 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/sass/language.sass", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -3010,6 +3893,59 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -3328,19 +4264,83 @@ exports[`sourceMap option should generate source maps when value is not specifie "test/sass/language.sass", "test/sass/another/variables.sass", ], - "version": 3, -} -`; - -exports[`sourceMap option should generate source maps when value is not specified and the "devtool" option has "source-map" value ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" -exports[`sourceMap option should generate source maps when value is not specified and the "devtool" option has "source-map" value ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], + "version": 3, +} +`; + +exports[`sourceMap option should generate source maps when value is not specified and the "devtool" option has "source-map" value ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; + +exports[`sourceMap option should generate source maps when value is not specified and the "devtool" option has "source-map" value ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} nav ul { margin: 0; @@ -3383,6 +4383,59 @@ exports[`sourceMap option should generate source maps when value is not specifie "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -3456,6 +4509,70 @@ exports[`sourceMap option should generate source maps when value is not specifie "test/sass/language.sass", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -3511,6 +4628,59 @@ exports[`sourceMap option should generate source maps when value is not specifie "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -3831,18 +5001,82 @@ exports[`sourceMap option should generate source maps when value is not specifie "test/sass/language.sass", "test/sass/another/variables.sass", ], - "version": 3, -} -`; + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" -exports[`sourceMap option should generate source maps when value is not specified and the "devtool" option has "source-map" value ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' -exports[`sourceMap option should generate source maps when value is not specified and the "devtool" option has "source-map" value ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], + "version": 3, +} +`; + +exports[`sourceMap option should generate source maps when value is not specified and the "devtool" option has "source-map" value ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; + +exports[`sourceMap option should generate source maps when value is not specified and the "devtool" option has "source-map" value ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; } nav ul { @@ -3886,6 +5120,59 @@ exports[`sourceMap option should generate source maps when value is not specifie "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -3959,6 +5246,70 @@ exports[`sourceMap option should generate source maps when value is not specifie "test/sass/language.sass", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -4014,6 +5365,59 @@ exports[`sourceMap option should generate source maps when value is not specifie "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -4357,6 +5761,75 @@ exports[`sourceMap option should generate source maps with absolute URLs ('dart- "test/node_modules/module/module.scss", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" +@import "module" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + ".module { + background: hotpink; +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -4417,6 +5890,64 @@ exports[`sourceMap option should generate source maps with absolute URLs ('dart- "test/node_modules/module/module.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; +@import 'module'; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + ".module { + background: hotpink; +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -4495,6 +6026,75 @@ exports[`sourceMap option should generate source maps with absolute URLs ('dart- "test/node_modules/module/module.scss", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" +@import "module" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + ".module { + background: hotpink; +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -4537,23 +6137,81 @@ nav a { .foo:before { content: "\\e0c6"; } - -.bar:before { - content: "∑"; -}" -`; - -exports[`sourceMap option should generate source maps with absolute URLs ('dart-sass', 'modern-compiler' API, 'scss' syntax): errors 1`] = `[]`; - -exports[`sourceMap option should generate source maps with absolute URLs ('dart-sass', 'modern-compiler' API, 'scss' syntax): source map 1`] = ` -{ - "mappings": ";AACQ;ACDR;EACI;;;ADOJ;EACE;EACA,OALc;;;AASd;EACE;EACA;EACA;;AAGF;EAAK;;AAEL;EACE;EACA;EACA;;;AAWJ;EANE,uBAM4B;EALzB,oBAKyB;EAJxB,mBAIwB;EAHpB,eAGoB;;;AAG5B;EACE,SAlCY;;;AAuCd;EACE,SE9Cc", - "names": [], - "sourceRoot": "", - "sources": [ - "test/scss/language-source-maps.scss", - "test/node_modules/module/module.scss", - "test/scss/another/_variables.scss", + +.bar:before { + content: "∑"; +}" +`; + +exports[`sourceMap option should generate source maps with absolute URLs ('dart-sass', 'modern-compiler' API, 'scss' syntax): errors 1`] = `[]`; + +exports[`sourceMap option should generate source maps with absolute URLs ('dart-sass', 'modern-compiler' API, 'scss' syntax): source map 1`] = ` +{ + "mappings": ";AACQ;ACDR;EACI;;;ADOJ;EACE;EACA,OALc;;;AASd;EACE;EACA;EACA;;AAGF;EAAK;;AAEL;EACE;EACA;EACA;;;AAWJ;EANE,uBAM4B;EALzB,oBAKyB;EAJxB,mBAIwB;EAHpB,eAGoB;;;AAG5B;EACE,SAlCY;;;AAuCd;EACE,SE9Cc", + "names": [], + "sourceRoot": "", + "sources": [ + "test/scss/language-source-maps.scss", + "test/node_modules/module/module.scss", + "test/scss/another/_variables.scss", + ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; +@import 'module'; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + ".module { + background: hotpink; +} +", + "$n-ary-summation: '\\2211' +", ], "version": 3, } @@ -4902,6 +6560,75 @@ exports[`sourceMap option should generate source maps with absolute URLs ('sass- "test/node_modules/module/module.scss", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" +@import "module" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + ".module { + background: hotpink; +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -4962,6 +6689,64 @@ exports[`sourceMap option should generate source maps with absolute URLs ('sass- "test/node_modules/module/module.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; +@import 'module'; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + ".module { + background: hotpink; +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -5040,6 +6825,75 @@ exports[`sourceMap option should generate source maps with absolute URLs ('sass- "test/node_modules/module/module.scss", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" +@import "module" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + ".module { + background: hotpink; +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -5100,6 +6954,64 @@ exports[`sourceMap option should generate source maps with absolute URLs ('sass- "test/node_modules/module/module.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; +@import 'module'; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + ".module { + background: hotpink; +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -5424,6 +7336,70 @@ exports[`sourceMap option should generate sourcemap with "asset/resource" ('dart "webpack://sassLoaderExport/./sass/language.sass", "webpack://sassLoaderExport/./sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -5481,6 +7457,59 @@ exports[`sourceMap option should generate sourcemap with "asset/resource" ('dart "webpack://sassLoaderExport/./scss/language.scss", "webpack://sassLoaderExport/./scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -5556,6 +7585,70 @@ exports[`sourceMap option should generate sourcemap with "asset/resource" ('dart "webpack://sassLoaderExport/./sass/language.sass", "webpack://sassLoaderExport/./sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -5598,20 +7691,73 @@ nav a { .bar:before { content: "∑"; } -/*# sourceMappingURL=language.css.map*/" -`; - -exports[`sourceMap option should generate sourcemap with "asset/resource" ('dart-sass', 'modern-compiler' API, 'scss' syntax): errors 1`] = `[]`; +/*# sourceMappingURL=language.css.map*/" +`; + +exports[`sourceMap option should generate sourcemap with "asset/resource" ('dart-sass', 'modern-compiler' API, 'scss' syntax): errors 1`] = `[]`; + +exports[`sourceMap option should generate sourcemap with "asset/resource" ('dart-sass', 'modern-compiler' API, 'scss' syntax): source map 1`] = ` +{ + "file": "static/language.css", + "mappings": ";AACQ;AAMR;EACE;EACA,OALc;;;AASd;EACE;EACA;EACA;;AAGF;EAAK;;AAEL;EACE;EACA;EACA;;;AAWJ;EANE,uBAM4B;EALzB,oBAKyB;EAJxB,mBAIwB;EAHpB,eAGoB;;;AAG5B;EACE,SAlCY;;;AAuCd;EACE,SC7Cc", + "names": [], + "sourceRoot": "", + "sources": [ + "webpack://sassLoaderExport/./scss/language.scss", + "webpack://sassLoaderExport/./scss/another/_variables.scss", + ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} -exports[`sourceMap option should generate sourcemap with "asset/resource" ('dart-sass', 'modern-compiler' API, 'scss' syntax): source map 1`] = ` -{ - "file": "static/language.css", - "mappings": ";AACQ;AAMR;EACE;EACA,OALc;;;AASd;EACE;EACA;EACA;;AAGF;EAAK;;AAEL;EACE;EACA;EACA;;;AAWJ;EANE,uBAM4B;EALzB,oBAKyB;EAJxB,mBAIwB;EAHpB,eAGoB;;;AAG5B;EACE,SAlCY;;;AAuCd;EACE,SC7Cc", - "names": [], - "sourceRoot": "", - "sources": [ - "webpack://sassLoaderExport/./scss/language.scss", - "webpack://sassLoaderExport/./scss/another/_variables.scss", +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", ], "version": 3, } @@ -5939,6 +8085,70 @@ exports[`sourceMap option should generate sourcemap with "asset/resource" ('sass "webpack://sassLoaderExport/./sass/language.sass", "webpack://sassLoaderExport/./sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -5996,6 +8206,59 @@ exports[`sourceMap option should generate sourcemap with "asset/resource" ('sass "webpack://sassLoaderExport/./scss/language.scss", "webpack://sassLoaderExport/./scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -6071,6 +8334,70 @@ exports[`sourceMap option should generate sourcemap with "asset/resource" ('sass "webpack://sassLoaderExport/./sass/language.sass", "webpack://sassLoaderExport/./sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -6128,6 +8455,59 @@ exports[`sourceMap option should generate sourcemap with "asset/resource" ('sass "webpack://sassLoaderExport/./scss/language.scss", "webpack://sassLoaderExport/./scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; diff --git a/test/__snapshots__/sourceMap-options.test.js.snap b/test/__snapshots__/sourceMap-options.test.js.snap index 27d4a736..46c3ebc2 100644 --- a/test/__snapshots__/sourceMap-options.test.js.snap +++ b/test/__snapshots__/sourceMap-options.test.js.snap @@ -1555,6 +1555,70 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/sass/language.sass", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -1610,6 +1674,59 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -1683,6 +1800,70 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/sass/language.sass", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -1738,6 +1919,59 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -2291,22 +2525,86 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/sass/language.sass", "test/sass/another/variables.sass", ], - "version": 3, -} -`; + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" -exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "false" value ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' -exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "false" value ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} +body + font: 100% $font-stack + color: $primary-color -nav ul { - margin: 0; +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], + "version": 3, +} +`; + +exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "false" value ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; + +exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "false" value ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} + +nav ul { + margin: 0; padding: 0; list-style: none; } @@ -2346,6 +2644,59 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -2419,6 +2770,70 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/sass/language.sass", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -2474,6 +2889,59 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -2792,19 +3260,83 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/sass/language.sass", "test/sass/another/variables.sass", ], - "version": 3, -} -`; - -exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "source-map" value ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" -exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "source-map" value ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], + "version": 3, +} +`; + +exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "source-map" value ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; + +exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "source-map" value ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} nav ul { margin: 0; @@ -2847,6 +3379,59 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -2920,6 +3505,70 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/sass/language.sass", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -2975,6 +3624,59 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -3528,18 +4230,82 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/sass/language.sass", "test/sass/another/variables.sass", ], - "version": 3, -} -`; + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" -exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "source-map" value ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' -exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "source-map" value ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], + "version": 3, +} +`; + +exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "source-map" value ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; + +exports[`sourceMap option should generate source maps when value has "true" value and the "devtool" option has "source-map" value ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; } nav ul { @@ -3583,6 +4349,59 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -3656,6 +4475,70 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/sass/language.sass", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -3711,6 +4594,59 @@ exports[`sourceMap option should generate source maps when value has "true" valu "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -4029,19 +4965,83 @@ exports[`sourceMap option should generate source maps when value is not specifie "test/sass/language.sass", "test/sass/another/variables.sass", ], - "version": 3, -} -`; - -exports[`sourceMap option should generate source maps when value is not specified and the "devtool" option has "source-map" value ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" -exports[`sourceMap option should generate source maps when value is not specified and the "devtool" option has "source-map" value ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], + "version": 3, +} +`; + +exports[`sourceMap option should generate source maps when value is not specified and the "devtool" option has "source-map" value ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; + +exports[`sourceMap option should generate source maps when value is not specified and the "devtool" option has "source-map" value ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} nav ul { margin: 0; @@ -4084,6 +5084,59 @@ exports[`sourceMap option should generate source maps when value is not specifie "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -4157,6 +5210,70 @@ exports[`sourceMap option should generate source maps when value is not specifie "test/sass/language.sass", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -4212,6 +5329,59 @@ exports[`sourceMap option should generate source maps when value is not specifie "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -4765,18 +5935,82 @@ exports[`sourceMap option should generate source maps when value is not specifie "test/sass/language.sass", "test/sass/another/variables.sass", ], - "version": 3, -} -`; + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" -exports[`sourceMap option should generate source maps when value is not specified and the "devtool" option has "source-map" value ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' -exports[`sourceMap option should generate source maps when value is not specified and the "devtool" option has "source-map" value ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], + "version": 3, +} +`; + +exports[`sourceMap option should generate source maps when value is not specified and the "devtool" option has "source-map" value ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; + +exports[`sourceMap option should generate source maps when value is not specified and the "devtool" option has "source-map" value ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; } nav ul { @@ -4820,6 +6054,59 @@ exports[`sourceMap option should generate source maps when value is not specifie "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -4893,6 +6180,70 @@ exports[`sourceMap option should generate source maps when value is not specifie "test/sass/language.sass", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -4948,6 +6299,59 @@ exports[`sourceMap option should generate source maps when value is not specifie "test/scss/language.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -5291,6 +6695,75 @@ exports[`sourceMap option should generate source maps with absolute URLs ('dart- "test/node_modules/module/module.scss", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" +@import "module" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + ".module { + background: hotpink; +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -5351,6 +6824,64 @@ exports[`sourceMap option should generate source maps with absolute URLs ('dart- "test/node_modules/module/module.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; +@import 'module'; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + ".module { + background: hotpink; +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -5429,6 +6960,75 @@ exports[`sourceMap option should generate source maps with absolute URLs ('dart- "test/node_modules/module/module.scss", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" +@import "module" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + ".module { + background: hotpink; +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -5471,23 +7071,81 @@ nav a { .foo:before { content: "\\e0c6"; } - -.bar:before { - content: "∑"; -}" -`; - -exports[`sourceMap option should generate source maps with absolute URLs ('dart-sass', 'modern-compiler' API, 'scss' syntax): errors 1`] = `[]`; - -exports[`sourceMap option should generate source maps with absolute URLs ('dart-sass', 'modern-compiler' API, 'scss' syntax): source map 1`] = ` -{ - "mappings": ";AACQ;ACDR;EACI;;;ADOJ;EACE;EACA,OALc;;;AASd;EACE;EACA;EACA;;AAGF;EAAK;;AAEL;EACE;EACA;EACA;;;AAWJ;EANE,uBAM4B;EALzB,oBAKyB;EAJxB,mBAIwB;EAHpB,eAGoB;;;AAG5B;EACE,SAlCY;;;AAuCd;EACE,SE9Cc", - "names": [], - "sourceRoot": "", - "sources": [ - "test/scss/language-source-maps.scss", - "test/node_modules/module/module.scss", - "test/scss/another/_variables.scss", + +.bar:before { + content: "∑"; +}" +`; + +exports[`sourceMap option should generate source maps with absolute URLs ('dart-sass', 'modern-compiler' API, 'scss' syntax): errors 1`] = `[]`; + +exports[`sourceMap option should generate source maps with absolute URLs ('dart-sass', 'modern-compiler' API, 'scss' syntax): source map 1`] = ` +{ + "mappings": ";AACQ;ACDR;EACI;;;ADOJ;EACE;EACA,OALc;;;AASd;EACE;EACA;EACA;;AAGF;EAAK;;AAEL;EACE;EACA;EACA;;;AAWJ;EANE,uBAM4B;EALzB,oBAKyB;EAJxB,mBAIwB;EAHpB,eAGoB;;;AAG5B;EACE,SAlCY;;;AAuCd;EACE,SE9Cc", + "names": [], + "sourceRoot": "", + "sources": [ + "test/scss/language-source-maps.scss", + "test/node_modules/module/module.scss", + "test/scss/another/_variables.scss", + ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; +@import 'module'; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + ".module { + background: hotpink; +} +", + "$n-ary-summation: '\\2211' +", ], "version": 3, } @@ -6087,6 +7745,75 @@ exports[`sourceMap option should generate source maps with absolute URLs ('sass- "test/node_modules/module/module.scss", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" +@import "module" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + ".module { + background: hotpink; +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -6147,6 +7874,64 @@ exports[`sourceMap option should generate source maps with absolute URLs ('sass- "test/node_modules/module/module.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; +@import 'module'; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + ".module { + background: hotpink; +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -6225,6 +8010,75 @@ exports[`sourceMap option should generate source maps with absolute URLs ('sass- "test/node_modules/module/module.scss", "test/sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" +@import "module" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + ".module { + background: hotpink; +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -6285,6 +8139,64 @@ exports[`sourceMap option should generate source maps with absolute URLs ('sass- "test/node_modules/module/module.scss", "test/scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; +@import 'module'; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + ".module { + background: hotpink; +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -6609,6 +8521,70 @@ exports[`sourceMap option should generate sourcemap with "asset/resource" ('dart "webpack://sassLoaderExport/./sass/language.sass", "webpack://sassLoaderExport/./sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -6666,6 +8642,59 @@ exports[`sourceMap option should generate sourcemap with "asset/resource" ('dart "webpack://sassLoaderExport/./scss/language.scss", "webpack://sassLoaderExport/./scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -6741,6 +8770,70 @@ exports[`sourceMap option should generate sourcemap with "asset/resource" ('dart "webpack://sassLoaderExport/./sass/language.sass", "webpack://sassLoaderExport/./sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -6783,20 +8876,73 @@ nav a { .bar:before { content: "∑"; } -/*# sourceMappingURL=language.css.map*/" -`; - -exports[`sourceMap option should generate sourcemap with "asset/resource" ('dart-sass', 'modern-compiler' API, 'scss' syntax): errors 1`] = `[]`; +/*# sourceMappingURL=language.css.map*/" +`; + +exports[`sourceMap option should generate sourcemap with "asset/resource" ('dart-sass', 'modern-compiler' API, 'scss' syntax): errors 1`] = `[]`; + +exports[`sourceMap option should generate sourcemap with "asset/resource" ('dart-sass', 'modern-compiler' API, 'scss' syntax): source map 1`] = ` +{ + "file": "static/language.css", + "mappings": ";AACQ;AAMR;EACE;EACA,OALc;;;AASd;EACE;EACA;EACA;;AAGF;EAAK;;AAEL;EACE;EACA;EACA;;;AAWJ;EANE,uBAM4B;EALzB,oBAKyB;EAJxB,mBAIwB;EAHpB,eAGoB;;;AAG5B;EACE,SAlCY;;;AAuCd;EACE,SC7Cc", + "names": [], + "sourceRoot": "", + "sources": [ + "webpack://sassLoaderExport/./scss/language.scss", + "webpack://sassLoaderExport/./scss/another/_variables.scss", + ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} -exports[`sourceMap option should generate sourcemap with "asset/resource" ('dart-sass', 'modern-compiler' API, 'scss' syntax): source map 1`] = ` -{ - "file": "static/language.css", - "mappings": ";AACQ;AAMR;EACE;EACA,OALc;;;AASd;EACE;EACA;EACA;;AAGF;EAAK;;AAEL;EACE;EACA;EACA;;;AAWJ;EANE,uBAM4B;EALzB,oBAKyB;EAJxB,mBAIwB;EAHpB,eAGoB;;;AAG5B;EACE,SAlCY;;;AAuCd;EACE,SC7Cc", - "names": [], - "sourceRoot": "", - "sources": [ - "webpack://sassLoaderExport/./scss/language.scss", - "webpack://sassLoaderExport/./scss/another/_variables.scss", +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", ], "version": 3, } @@ -7361,6 +9507,70 @@ exports[`sourceMap option should generate sourcemap with "asset/resource" ('sass "webpack://sassLoaderExport/./sass/language.sass", "webpack://sassLoaderExport/./sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -7418,6 +9628,59 @@ exports[`sourceMap option should generate sourcemap with "asset/resource" ('sass "webpack://sassLoaderExport/./scss/language.scss", "webpack://sassLoaderExport/./scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -7493,6 +9756,70 @@ exports[`sourceMap option should generate sourcemap with "asset/resource" ('sass "webpack://sassLoaderExport/./sass/language.sass", "webpack://sassLoaderExport/./sass/another/variables.sass", ], + "sourcesContent": [ + "@import "another/variables" +@import "./file.css" + +$font-stack: Helvetica, sans-serif +$primary-color: #333 +$pi: '\\e0C6' + +body + font: 100% $font-stack + color: $primary-color + +nav + ul + margin: 0 + padding: 0 + list-style: none + + li + display: inline-block + + a + display: block + padding: 6px 12px + text-decoration: none + +=border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + -ms-border-radius: $radius + border-radius: $radius + +.box + +border-radius(10px) + +.message + border: 1px solid #ccc + padding: 10px + color: #333 + +.success + @extend .message + border-color: green + +.error + @extend .message + border-color: red + +.warning + @extend .message + border-color: yellow + +.foo + &:before + content: $pi + +.bar + &:before + content: $n-ary-summation + +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `; @@ -7550,6 +9877,59 @@ exports[`sourceMap option should generate sourcemap with "asset/resource" ('sass "webpack://sassLoaderExport/./scss/language.scss", "webpack://sassLoaderExport/./scss/another/_variables.scss", ], + "sourcesContent": [ + "@import "another/variables"; +@import "./file.css"; + +$font-stack: Helvetica, sans-serif; +$primary-color: #333; +$pi: '\\e0C6'; + +body { + font: 100% $font-stack; + color: $primary-color; +} + +nav { + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { display: inline-block; } + + a { + display: block; + padding: 6px 12px; + text-decoration: none; + } +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + border-radius: $radius; +} + +.box { @include border-radius(10px); } + +.foo { + &:before { + content: $pi; + } +} + +.bar { + &:before { + content: $n-ary-summation; + } +} +", + "$n-ary-summation: '\\2211' +", + ], "version": 3, } `;