Skip to content

webpack loaders right way #7

Description

@spac3unit

Hello. Can you provide some info about using loaders in webpack configs?
I trying to load png and jpg files in my component:
import image from "../../assets/cover.png"
and have error:
Unexpected character '�' (1:0)

i tried with url-loader and file-loader in my webpack/developement.js and webpack/production.js, like this:

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

Thx!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions