Skip to content

Commit

Permalink
fix(runner): 修复样式条件编译问题,close #7410 (#7450)
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam authored Sep 2, 2020
1 parent 2408752 commit bcf5a0c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
8 changes: 6 additions & 2 deletions packages/taro-mini-runner/src/webpack/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,16 @@ export const getModule = (appPath: string, {
sourceMap: true,
implementation: sass,
sassOptions: {
indentedSyntax: true
indentedSyntax: true,
outputStyle: 'expanded'
}
}, sassLoaderOption])
const scssLoader = getSassLoader([{
sourceMap: true,
implementation: sass
implementation: sass,
sassOptions: {
outputStyle: 'expanded'
}
}, sassLoaderOption])

const postcssLoader = getPostcssLoader([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ exports[`vue should build vue app 2`] = `
}, function(module, exports, __webpack_require__) {
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(2);
exports = ___CSS_LOADER_API_IMPORT___(false);
exports.push([ module.i, \\".index{color:blue}\\", \\"\\" ]);
exports.push([ module.i, \\".index {\\\\n color: blue;\\\\n}\\", \\"\\" ]);
module.exports = exports;
}, function(module, __webpack_exports__, __webpack_require__) {
\\"use strict\\";
Expand All @@ -49,7 +49,7 @@ exports[`vue should build vue app 2`] = `
}, function(module, exports, __webpack_require__) {
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(2);
exports = ___CSS_LOADER_API_IMPORT___(false);
exports.push([ module.i, \\".detail{color:red}\\", \\"\\" ]);
exports.push([ module.i, \\".detail {\\\\n color: red;\\\\n}\\", \\"\\" ]);
module.exports = exports;
}, function(module, __webpack_exports__, __webpack_require__) {
\\"use strict\\";
Expand Down
8 changes: 6 additions & 2 deletions packages/taro-webpack-runner/src/util/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,15 +398,19 @@ export const getModule = (appPath: string, {
sourceMap: true,
implementation: sass,
sassOptions: {
indentedSyntax: true
indentedSyntax: true,
outputStyle: 'expanded'
}
},
sassLoaderOption
])
const scssLoader = getSassLoader([
{
sourceMap: true,
implementation: sass
implementation: sass,
sassOptions: {
outputStyle: 'expanded'
}
},
sassLoaderOption
])
Expand Down

0 comments on commit bcf5a0c

Please sign in to comment.