Skip to content

Commit

Permalink
fix: fix scss hot-build
Browse files Browse the repository at this point in the history
BREAKING CHANGE: = =
  • Loading branch information
SoldierAb committed Dec 22, 2019
1 parent 7394d49 commit c23ba1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ const scssTask = (done, themeType = theme) => new Promise((resolve) => {
const bundleScss = themeType => {
return gulp.src([...scss_path, '!src/theme/*.scss'])
.pipe(sourcemaps.init())
.on('error', scss.logError) //错误信息
.pipe(setGlobalScss(themeType))
.pipe(scss())
.pipe(scss().on('error', scss.logError))
.pipe(gulpif(node_env === 'production', cleanCss())) // 仅在生产环境时候进行压缩
.pipe(autoprefix())
.pipe(rename((path) => {
Expand Down Expand Up @@ -137,4 +136,5 @@ gulp.task('js', jsTask)
gulp.task('html', injectTask)
gulp.task('server', server)
gulp.task('default', gulp.series('clean', gulp.parallel('scss', 'js'), 'watch', 'server'))
gulp.task('hot-build', gulp.series('clean', gulp.parallel('scss', 'js'), 'watch'))
gulp.task('build', gulp.series('clean', gulp.parallel('scss', 'js')))

0 comments on commit c23ba1f

Please sign in to comment.