Justineo / vue-octicon

Octicon component for Vue.js, using inline SVG.
https://justineo.github.io/vue-octicon/demo/
MIT License
125 stars 14 forks source link

Icons should be transpiled beforehand #2

Open hiendv opened 7 years ago

hiendv commented 7 years ago

Reproduce:

Workaround: Using this webpack configuration

    {
        test: /\.js$/,
        loader: 'babel-loader',
        include: [resolve('src'), resolve('test'), resolve('node_modules/vue-octicon')]
      },
Justineo commented 7 years ago

Actually in a related project Vue-Awesome I already put this into readme. I'll update that for this project later. As for now you can refer to Vue-Awesome's readme and make similar updates.

hiendv commented 7 years ago

From my point of view, transpiling these icons could be the better way.

gquintana commented 6 years ago
ERROR in js/vendor.39228e8c3d000eeb2e39.js from UglifyJs
Unexpected token: name (warn) [./~/vue-octicon/util.js:3,0][js/vendor.39228e8c3d000eeb2e39.js:13682,4]
simon300000 commented 5 years ago

This is how I solved it, by submodule/download this repo to src/components directory

import Octicon from '@/components/vue-octicon/src/components/Octicon.vue'
import '@/components/vue-octicon/src/icons/device-desktop'
...