File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -423,8 +423,18 @@ export class SeedConfig {
423423 }
424424 }
425425 } ,
426+
426427 // Note: you can customize the location of the file
427- 'environment-config' : require ( '../env/config.json' )
428+ 'environment-config' : require ( '../env/config.json' ) ,
429+
430+ /**
431+ * The options to pass to gulp-sass (and then to node-sass).
432+ * Reference: https://github.com/sass/node-sass#options
433+ * @type {object }
434+ */
435+ 'gulp-sass' : {
436+ includePaths : [ './node_modules/' ]
437+ } ,
428438 } ;
429439
430440 /**
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import {
1616 ENABLE_SCSS ,
1717 ENV ,
1818 TMP_DIR ,
19+ getPluginConfig ,
1920} from '../../config' ;
2021
2122const plugins = < any > gulpLoadPlugins ( ) ;
@@ -63,7 +64,7 @@ function processComponentScss() {
6364 . pipe ( isProd ? plugins . cached ( 'process-component-scss' ) : plugins . util . noop ( ) )
6465 . pipe ( isProd ? plugins . progeny ( ) : plugins . util . noop ( ) )
6566 . pipe ( plugins . sourcemaps . init ( ) )
66- . pipe ( plugins . sass ( { includePaths : [ './node_modules/' ] } ) . on ( 'error' , plugins . sass . logError ) )
67+ . pipe ( plugins . sass ( getPluginConfig ( 'gulp-sass' ) ) . on ( 'error' , plugins . sass . logError ) )
6768 . pipe ( plugins . postcss ( processors ) )
6869 . pipe ( plugins . sourcemaps . write ( isProd ? '.' : '' ) )
6970 . pipe ( gulp . dest ( isProd ? TMP_DIR : APP_DEST ) ) ;
@@ -124,7 +125,7 @@ function getExternalScssStream() {
124125 return gulp . src ( getExternalScss ( ) )
125126 . pipe ( isProd ? plugins . cached ( 'process-external-scss' ) : plugins . util . noop ( ) )
126127 . pipe ( isProd ? plugins . progeny ( ) : plugins . util . noop ( ) )
127- . pipe ( plugins . sass ( { includePaths : [ './node_modules/' ] } ) . on ( 'error' , plugins . sass . logError ) ) ;
128+ . pipe ( plugins . sass ( getPluginConfig ( 'gulp-sass' ) ) . on ( 'error' , plugins . sass . logError ) ) ;
128129}
129130
130131/**
You can’t perform that action at this time.
0 commit comments