dschewchenko / nuxt-svgicon

MIT License
6 stars 4 forks source link

Error on when run dev #3

Closed tranghaviet closed 5 years ago

tranghaviet commented 5 years ago

When I run dev server the index.js was import wrong files so I get error file not found.

My nuxt config:

[
  'nuxt-svgicon', {
      tagName: 'svg-icon',
      sourcePath: 'svg-icons',
      targetPath: 'components/compiled-icons',
    }
]

I put all svg icons in svg-icons folder

The generated files in components/compiled-icons folder:

image

The components/compiled-icons/index.js file:

/* eslint-disable */
import './chevron-up-circle.js'
import './new-solid.js'
import './plus-circle.js'

Please help me :(

dschewchenko commented 5 years ago

Hi. Set subDir option the same as sourcePath. And all will be good :)

dschewchenko commented 5 years ago

In next release I will set subDir same as sourcePath by default

tranghaviet commented 5 years ago

Hope to see it. Good work @dschewchenko :D