File tree 1 file changed +9
-4
lines changed
packages/compiler-sfc/src
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
1
import merge from 'merge-source-map'
2
2
import path from 'path'
3
+ import { RawSourceMap } from 'source-map'
4
+ import { SFCStyleCompileOptions } from './compileStyle'
3
5
4
6
export interface StylePreprocessor {
5
7
render (
6
8
source : string ,
7
- map ?: object ,
8
- options ?: any ,
9
- customRequire ?: ( id : string ) => any
9
+ map : RawSourceMap | undefined ,
10
+ options : {
11
+ [ key : string ] : any
12
+ filename : string
13
+ } ,
14
+ customRequire : SFCStyleCompileOptions [ 'preprocessCustomRequire' ]
10
15
) : StylePreprocessorResults
11
16
}
12
17
@@ -83,7 +88,7 @@ const less: StylePreprocessor = {
83
88
// less output path is relative path
84
89
const dependencies = getAbsolutePaths (
85
90
result . imports ,
86
- path . dirname ( options . fileName )
91
+ path . dirname ( options . filename )
87
92
)
88
93
if ( map ) {
89
94
return {
You can’t perform that action at this time.
0 commit comments