@@ -64,16 +64,16 @@ function getSvgPaths (postCssRoot, webpackResolve, context) {
6464 } ) ;
6565 } )
6666 ) )
67- . then ( ( resolvedFilenames ) => ( {
67+ . then ( ( resolvedFilenames ) => ( {
6868 // Original paths (unprocessed relative to the current css file context)
69- unresolved : unresolvedPaths ,
70- // Absolute paths
71- resolved : resolvedFilenames ,
72- // Relative unix paths (to the cwd)
73- relative : resolvedFilenames . map (
74- ( resolvedPath ) => path . relative ( '.' , resolvedPath ) . replace ( new RegExp ( '\\' + path . sep , 'g' ) , '/' )
75- )
76- } ) ) ;
69+ unresolved : unresolvedPaths ,
70+ // Absolute paths
71+ resolved : resolvedFilenames ,
72+ // Relative unix paths (to the cwd)
73+ relative : resolvedFilenames . map (
74+ ( resolvedPath ) => path . relative ( '.' , resolvedPath ) . replace ( new RegExp ( '\\' + path . sep , 'g' ) , '/' )
75+ )
76+ } ) ) ;
7777}
7878
7979/**
@@ -152,7 +152,7 @@ function addFontDeclaration (fontName, postCssRoot, useCssModules, svgPaths) {
152152 * PostCSS Plugin factory
153153 */
154154module . exports = postcss . plugin ( 'iconfont-webpack' , config => function ( root , result ) {
155- const cssFilename = result . opts . to ;
155+ const cssFilename = result . opts . from ;
156156 const context = path . dirname ( cssFilename ) ;
157157 return getSvgPaths ( root , config . resolve , context )
158158 . then ( function ( svgPaths ) {
0 commit comments