Skip to content

Commit

Permalink
fix(cli): set default value for sassOptions.outputStyle to nested #1013
Browse files Browse the repository at this point in the history
  • Loading branch information
fxy060608 committed Nov 22, 2019
1 parent c1f66ea commit a7e6c2b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/vue-cli-plugin-uni/lib/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ module.exports = function initOptions (options) {
sassData = `${sassData}
@import "@/uni.scss";`
}

if (!options.css.loaderOptions.sass.sassOptions) {
options.css.loaderOptions.sass.sassOptions = {}
}
// 指定 outputStyle, 否则 production 模式下会被默认成 compressed
options.css.loaderOptions.sass.sassOptions.outputStyle = 'nested'

if (sassLoaderVersion < 8) {
options.css.loaderOptions.sass.data = sassData
Expand Down

0 comments on commit a7e6c2b

Please sign in to comment.