Skip to content

Commit

Permalink
update readme for SSR
Browse files Browse the repository at this point in the history
  • Loading branch information
Allenice committed Apr 26, 2017
1 parent bc729c8 commit 489324b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Expand Up @@ -192,3 +192,19 @@ You can use multiple directory to discriminate the icons which has the same name
<svgicon icon="sora/fit/arrow" width="50" height="50"></svgicon>

```

### Work on server-side render (SSR)
The component will insert the css style code to the **document** Object, so it will throw an error in SSR. The solution is defind an alias for vue-svgicon module if you use webpack.

```javascript
var config = {
module: {
resolve: {
alias: {
'vue-svgicon$': 'vue-svgicon/component/svgicon.vue'
}
}
}
}
```
If you are use other build system..., I think you can find a solution like wepack way.

0 comments on commit 489324b

Please sign in to comment.