Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

How to use in vue components of webpack? #19

Closed
AaronW-BE opened this issue Mar 21, 2017 · 2 comments
Closed

How to use in vue components of webpack? #19

AaronW-BE opened this issue Mar 21, 2017 · 2 comments

Comments

@AaronW-BE
Copy link

I will use vue-charts in webpack project, but i still dont know how to setup in main.js. Need i edit index.html file ?

@fyyyyy
Copy link

fyyyyy commented Apr 13, 2017

This works

Dont do import VueCharts from 'hchs-vue-charts', use the global window.VueCharts instead to initialize with Vue.

import Vue from 'vue';
import 'chart.js';
import 'hchs-vue-charts';

Vue.use(window.VueCharts);

@jofftiquez
Copy link

Still it would be better to create a build for commonjs-2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants