2017-05-19 4 views
-1

전 세계 곳곳에서 검색했습니다. 하지만 여전히 문제를 해결할 수 없었습니다. 누군가 나를 도와주세요. 이미지 파일을 해결할 수 없다는 오류 메시지가 계속 나타납니다. scss 파일을 다른 sass 파일로 가져 오기 때문에 상대 경로 나 절대 경로와 관련이 있어야합니다. 또한이 유형을 처리하기 위해 적절한 로더가 필요하다는 오류를주지 않습니다. Webpack에서 이미지를 변환 할 수 없습니다.

enter image description here

This is my webpack config. 
`{test: /\.(jpe?g|png|gif|svg)$/i, 
    use: 'file-loader' 
    }, 
    { 
    test: /.scss$/, 
    use: ExtractTextPlugin.extract({ 
     fallback: 'style-loader', 
     use: 'css-loader!resolve-url-loader!sass-loader', 
     publicPath: '/' 
    }) 
    },` 

나는 다른 SASS 파일에 그로드 @import를 사용하고 있습니다. 위해

&:after { background: url('./images/themeTab.png') no-repeat center;} 

답변

0

는 URL을, 어느 한 항 로더에 resolve-url-loaderneeds source maps enabled를 다시 작성하는 방법을 알고 있습니다.

use: 'css-loader!resolve-url-loader!sass-loader?sourceMap', 
:

처럼 당신의 .scss 로더 체인을 변경