Skip to content

Commit

Permalink
fix: include user-defined css loader options (#130)
Browse files Browse the repository at this point in the history
fixes #128
  • Loading branch information
Lanchi authored and DRoet committed Oct 21, 2019
1 parent ceb1247 commit b2bea45
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions util/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,14 @@ function mergeRules (api, opt, ext) {
sassLoaderVersion = semver.major(require('sass-loader/package.json').version)
} catch (e) {}

// Merge with user-defined loader data config
if (sassLoaderVersion < 8) {
if (opt.data) data.unshift(opt.data)

opt.data = data.join('\n')
} else {
if (opt.prependData) data.unshift(opt.prependData)

opt.prependData = data.join('\n')
}

Expand Down

0 comments on commit b2bea45

Please sign in to comment.