MMF-FE / svgicon

SVG icon components and tool set
https://mmf-fe.github.io/svgicon
MIT License
922 stars 95 forks source link

SSR. Doesn't work => icon.register() is not a function #30

Closed o-alexandrov closed 7 years ago

o-alexandrov commented 7 years ago

Hello and thank you for simplifying workflow with svg icons.

Story

I have read the #2, so I have tried the use of adding an alias to already existing ones:

'vue-svgicon$': 'vue-svgicon/component/svgicon.vue'

I am using the latest vue.js, webpack, and other deps. Basically, I am using almost identical boilerplate to vue-hackernews.

Problem

I have checked my SVGs without SSR, they work fine. However with SSR, it then produces an error:

icon.register is not a function

Please let me know any ideas on what might be an issue.

Allenice commented 7 years ago

Please update to v2.0.0 and try again, and you should read README for v2.x changes

SergeyKhval commented 6 years ago

@Allenice FYI the section with instructions was removed from README in recent commits

Allenice commented 6 years ago

@SergeyKhval Yes, It was removed, because you don't need to do anything to deal with SSR.