Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3cb0f30

Browse filesBrowse files
committed
Merge branch 'master' of github.com:vuejs/vue-loader
2 parents c2b4bc1 + 9416ae9 commit 3cb0f30
Copy full SHA for 3cb0f30

File tree

Expand file treeCollapse file tree

2 files changed

+7
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+7
-3
lines changed

‎lib/style-rewriter.js

Copy file name to clipboardExpand all lines: lib/style-rewriter.js
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,13 @@ module.exports = function (css, map) {
3636
var query = loaderUtils.parseQuery(this.query)
3737
var options = this.options.vue || {}
3838
var autoprefixOptions = options.autoprefixer
39+
40+
// plugins
3941
var plugins = options.postcss
40-
? options.postcss.slice() // make sure to copy it
41-
: []
42+
if (typeof plugins === 'function') {
43+
plugins = plugins.call(this, this)
44+
}
45+
plugins = plugins ? plugins.slice() : [] // make sure to copy it
4246

4347
// scoped css
4448
if (query.scoped) {

‎test/test.js

Copy file name to clipboardExpand all lines: test/test.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe('vue-loader', function () {
3434

3535
function getFile (file, cb) {
3636
fs.readFile(path.resolve(outputDir, file), 'utf-8', function (err, data) {
37-
expect(err).to.be.null
37+
expect(err).to.be.not.exist
3838
cb(data)
3939
})
4040
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.