alex-oleshkevich / vue-introjs

intro.js bindings for Vue.
MIT License
301 stars 53 forks source link

import VueIntro from 'intro.js' or import VueIntro from 'vue-introjs' #16

Closed ghenry closed 6 years ago

ghenry commented 6 years ago

Hi,

In the readme you have both:


import VueIntro from 'intro.js'; 

import VueIntro from 'vue-introjs';

I am seeing:

[Vue warn]: Error in mounted hook: "ReferenceError: intro is not defined"

after adding this to my webpack.dev.conf.js

  plugins: [
    new webpack.DefinePlugin({
      'process.env': require('../config/dev.env'),
       introJs: ['intro.js', 'introJs']
    }),
ghenry commented 6 years ago

I also have this in my Component.vue:

import intro from 'intro.js'

Sorry, I'm used to a vuejs addon having everything it needs.

alex-oleshkevich commented 6 years ago

I don't want to ship introjs library with this plugin. Because a) this is out of scope of this plugin, b) I don't want to lock you with a version of introjs.

It is up to you to choose a way of how to add introjs: via npm or CDN.

Also you can look in examples directory.

Feel free to contact me if you still need support.

On Feb 16, 2018 7:59 PM, "Gavin Henry" notifications@github.com wrote:

I also have this in my Component.vue:

import intro from 'intro.js'

Sorry, I'm used to a vuejs addon having everything it needs.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alex-oleshkevich/vue-introjs/issues/16#issuecomment-366294447, or mute the thread https://github.com/notifications/unsubscribe-auth/AAmzyE_LjS18poO7q3O-SmJ6lVtQT2VCks5tVbPmgaJpZM4SInln .

ghenry commented 6 years ago

Will do.

I'll submit a doc PR too once I'm done for vuejs sfc usage.

Can you get back to me on the issue subject?

ghenry commented 6 years ago

In my haste, it's:

new webpack.ProvidePlugin({

NOOOT

new webpack.DefinePlugin({