Skip to content
This repository was archived by the owner on Dec 26, 2018. It is now read-only.

Commit 45c4a50

Browse files
committed
cssnano: safe by default, allow config in vue.config.js
1 parent 8b1d51b commit 45c4a50

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/style-rewriter.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
var postcss = require('postcss')
22
var selectorParser = require('postcss-selector-parser')
33
var cache = require('lru-cache')(100)
4+
var assign = require('object-assign')
45
var options = require('./compilers/options')
56

67
var currentId
@@ -58,9 +59,10 @@ module.exports = function (id, css, scoped) {
5859
}
5960
// minification
6061
if (process.env.NODE_ENV === 'production') {
61-
plugins.push(require('cssnano')({
62-
autoprefixer: false
63-
}))
62+
plugins.push(require('cssnano')(assign({
63+
autoprefixer: false,
64+
safe: true
65+
}, options.cssnano)))
6466
}
6567
currentId = id
6668
return postcss(plugins)

0 commit comments

Comments
 (0)