@@ -3,6 +3,7 @@ import type { EyeglassOptions, default as Eyeglass } from "eyeglass"; // works,
3
3
import type { Result , SassError } from "node-sass" ;
4
4
import type SassImplementation from "node-sass" ;
5
5
import { sep as PATH_SEPARATOR } from "path" ;
6
+ import cloneDeep = require( "lodash.clonedeep" ) ;
6
7
7
8
export type Adaptor = ( sass : typeof SassImplementation , eyeglass : typeof Eyeglass , options : EyeglassOptions ) => Preprocessor ;
8
9
export type AdaptorSync = ( sass : typeof SassImplementation , eyeglass : typeof Eyeglass , options : EyeglassOptions ) => PreprocessorSync ;
@@ -123,7 +124,10 @@ export class DirectoryScopedPreprocessor implements PreprocessorProvider {
123
124
*/
124
125
init ( sass : typeof SassImplementation , eyeglass : typeof Eyeglass , options : EyeglassOptions = { } ) {
125
126
let sassOptions = this . setupOptions ( options ) ;
126
- let sassOptionsSync = this . setupOptionsSync ? this . setupOptionsSync ( sassOptions ) : sassOptions ;
127
+
128
+ let sassOptionsSync = cloneDeep ( sassOptions ) ;
129
+ sassOptionsSync = this . setupOptionsSync ? this . setupOptionsSync ( sassOptionsSync ) : sassOptionsSync ;
130
+
127
131
this . scssProcessor = adaptor ( sass , eyeglass , sassOptions ) ;
128
132
this . scssProcessorSync = adaptorSync ( sass , eyeglass , sassOptionsSync ) ;
129
133
}
@@ -146,7 +150,7 @@ export class DirectoryScopedPreprocessor implements PreprocessorProvider {
146
150
* provided from the application that will be used for compiling this
147
151
* package's block files synchronously.
148
152
*
149
- * The options passed into this function are those returned by
153
+ * The options passed into this function are a copy of those returned by
150
154
* setupOptions(), so this method only needs to update those options as
151
155
* appropriate to support synchronous compilation.
152
156
*
0 commit comments