Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loader breaks when importing an image with a filename that starts with a digit #131

Open
fiso opened this issue Mar 23, 2021 · 1 comment

Comments

@fiso
Copy link

fiso commented Mar 23, 2021

I tried to load an image called "3d.svg" and I got this stacktrace. It's easy to work around, but I thought you might want to know about the problem.

image

@ensconced
Copy link

In my case I wasn't able to change the filename, because the SVGs were from a dependency in node_modules, but there is still a workaround by using the name option:

{
  test: /\.svg$/,
  loader: [
    {
      loader: 'svg-react-loader',
      options: {
        name: 'SVG',
      },
    },
  ],
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants