ankane / chartkick

Create beautiful JavaScript charts with one line of Ruby
https://chartkick.com
MIT License
6.33k stars 565 forks source link

Minify chartkick and chart vendor JS #619

Closed tellodaniel closed 6 months ago

tellodaniel commented 6 months ago

Updates

  1. Adds terser rollup plugin to allow Chart bundle to be minified.
  2. Minifies chartkick.js

Why?

  1. This will help pages that uses chartkick to load faster. Specially on mobile under a slow connection.
  2. Will help pages to get a better scoring on Google's lighthouse.
ankane commented 6 months ago

Hi @tellodaniel, thanks for the PR. You can use Sprockets to minify if needed, so it's not something I'd like to include.