You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -176,6 +176,29 @@ export default Line.extend({
176
176
})
177
177
```
178
178
179
+
## Webpack & Bundling tools
180
+
There are now two version the main entry point is `src/index.js` which is the ES6 source, unbundled.
181
+
If you're using webpack it is recommended to use this one. Because the bundled umd version has vue.js and chart.js bundled into it.
182
+
183
+
However if you have problems o you can import the dist file
184
+
185
+
```
186
+
import VueCharts from 'vue-chartjs/dist/vue-chartjs'
187
+
// or
188
+
import { Line } from 'vue-chartjs/dist/vue-chartjs'
189
+
```
190
+
191
+
Or you can set an alias.
192
+
193
+
### Browserify
194
+
195
+
In order for a browserify user to transpile the code, they would need to install `babelify` and `babel-preset-es2015` and add a .babelrc file in the root of their project with the following code:
Copy file name to clipboardExpand all lines: docs/README.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -278,3 +278,27 @@ Sometimes you need more control over chart.js. Thats why you can access the char
278
278
### Bubble
279
279
280
280

281
+
282
+
## Webpack & Bundling tools
283
+
There are now two version the main entry point is `src/index.js` which is the ES6 source, unbundled.
284
+
If you're using webpack it is recommended to use this one. Because the bundled umd version has vue.js and chart.js bundled into it.
285
+
286
+
However if you have problems o you can import the dist file
287
+
288
+
```
289
+
import VueCharts from 'vue-chartjs/dist/vue-chartjs'
290
+
// or
291
+
import { Line } from 'vue-chartjs/dist/vue-chartjs'
292
+
```
293
+
294
+
Or you can set an alias.
295
+
296
+
### Browserify
297
+
298
+
In order for a browserify user to transpile the code, they would need to install `babelify` and `babel-preset-es2015` and add a .babelrc file in the root of their project with the following code:
0 commit comments