Skip to content

πŸ’Ž Release new version 2.4.0

Compare
Choose a tag to compare
@apertureless apertureless released this 03 Mar 15:26
· 647 commits to main since this release

Changes

  • Add src to npm packge
  • Make src/index (ES6 Module) main entry point
  • #51 Add browserify Support

Dist files

Now the main entry is the src file. The benefit is, that the dependencies chart.js and vue.js are not bundled into them. As in the dist/ file. Bundling vue in the commonjs build was nessasary as vue-chartjs uses Vue.extend() to create the Base Charts. Which caused multiple versions of vue and two instances.

If you're using Webpack2 there are no known problems. For Browserify you will need babelify and babel-preset-es2015 and a .babelrc with

{
"presets": ["es2015"]
}

Old dist files

However if you're encountering problems, or using unpkg you can use the bundled files:
Either import them directly

import VueCharts from 'vue-chartjs/dist/vue-chartjs'

Or you can set an alias in your webpack conf, like many do for vue.common.js