Skip to content

Commit 86045d3

Browse files
steffenmllrdevongovett
authored andcommitted
add data so it is possible to include globals scss variables (#1035)
1 parent ce6f696 commit 86045d3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/assets/SASSAsset.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const CSSAsset = require('./CSSAsset');
22
const localRequire = require('../utils/localRequire');
33
const promisify = require('../utils/promisify');
44
const path = require('path');
5+
const os = require('os');
56

67
class SASSAsset extends CSSAsset {
78
async parse(code) {
@@ -16,7 +17,7 @@ class SASSAsset extends CSSAsset {
1617
opts.includePaths = (opts.includePaths || []).concat(
1718
path.dirname(this.name)
1819
);
19-
opts.data = code;
20+
opts.data = opts.data ? (opts.data + os.EOL + code) : code;
2021
opts.indentedSyntax =
2122
typeof opts.indentedSyntax === 'boolean'
2223
? opts.indentedSyntax

0 commit comments

Comments
 (0)