jacobmischka / gatsby-plugin-react-svg

Adds svg-react-loader to gatsby webpack config
https://www.npmjs.com/package/gatsby-plugin-react-svg
MIT License
70 stars 21 forks source link

Unable to import files with '#' in filename #28

Open seanemmer opened 4 years ago

seanemmer commented 4 years ago

gatsby-config.js

    {
      resolve: 'gatsby-plugin-react-svg',
      options: {
        rule: {
          include: /duotone-icons-2/
        }
      }
    }

Application Code

import ServicesIcon from '../landkit/img/icons/duotone-icons-2/Shopping/Chart-line#1.svg'

...

<div className='icon icon-sm text-success'>
  <ServicesIcon />
</div>

Gatsby Develop Output:

image