MMF-FE / svgicon

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

Import Individually don't work #43

Closed AdsonCicilioti closed 6 years ago

AdsonCicilioti commented 6 years ago

Import individually, do not working for me.

I follow all steps of README.MD ....

// main.js
import Vue from 'vue';
import BootstrapVue from 'bootstrap-vue';
import SimpleVueValidation from 'simple-vue-validator';
import 'bootstrap-vue/dist/bootstrap-vue.css';

// vue-svgicon here
import * as svgicon from 'vue-svgicon';

import App from './App';
import EventBus from './core/EventBus';
import EToaster from './components/EToaster';
import templates from './lib/templates';

import router from './router';
import store from './store';

Vue.use (svgicon);
Vue.use (BootstrapVue);
Vue.use (SimpleVueValidation, {templates});
Vue.use (EToaster);

Vue.prototype. $ Bus = EventBus;

Vue.config.productionTip = false;

/ * eslint-disable no-new * /
const app = new Vue ({
    the: '#app',
    router,
    store
    components: {App},
    render (createElement) {
        return createElement ('App');
    },
});

window.app = app;

 ...but all the imports I made in my templates return:

This dependency was not found:
* icons/filter in ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/EFilter.vue
To install it, you can run it: npm install --save icons/filter

I'm using Vuejs with Webpack. And my output icons are in src/components/icons. And i work on Windows 10 OS.

How do I make my imports work as well as their instructions? Eg.: import 'icons/[name-of-icon]' ?

rayzaranza commented 6 years ago

You need to type the full path: ./components/icons/[name-of-icon] or if inside another component ../icons/[name-of-icon]

AdsonCicilioti commented 6 years ago

Hmm ok .. For me it registered some kind of global route .. I'm sorry I'm new to Vue.

And thank you!