Skip to content

Commit

Permalink
Merge branch 'master' of github.com:vuejs/vue-loader
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Dec 27, 2015
2 parents c2b4bc1 + 9416ae9 commit 3cb0f30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions lib/style-rewriter.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ module.exports = function (css, map) {
var query = loaderUtils.parseQuery(this.query)
var options = this.options.vue || {}
var autoprefixOptions = options.autoprefixer

// plugins
var plugins = options.postcss
? options.postcss.slice() // make sure to copy it
: []
if (typeof plugins === 'function') {
plugins = plugins.call(this, this)
}
plugins = plugins ? plugins.slice() : [] // make sure to copy it

// scoped css
if (query.scoped) {
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('vue-loader', function () {

function getFile (file, cb) {
fs.readFile(path.resolve(outputDir, file), 'utf-8', function (err, data) {
expect(err).to.be.null
expect(err).to.be.not.exist
cb(data)
})
}
Expand Down

0 comments on commit 3cb0f30

Please sign in to comment.