webpack-contrib / file-loader

File Loader
MIT License
1.86k stars 255 forks source link

import png from './image.png'; png is object,is not a url(string) #378

Closed liuchunda closed 4 years ago

liuchunda commented 4 years ago

file-loader version:1.0.0

//webpack.config.js

{
                test:/\.(png|jpg|gif)$/,
                use:[{loader:"file-loader"}]
            },

//index.js import resultPng from './image.png';

the resultPng is a object =>{"default":"ec7912772accb93cf96e84407a5459d4.jpg"}.is not a url string.

alexander-akait commented 4 years ago

It looks like you just deleted our lovely crafted issue template. It was there for good reasons. Please help us solving your issue by answering the questions asked in this template. I'm closing this. Please either update the issue with the template and reopen, or open a new issue.

Update your deps to latest