Chart.js/.size-limit.cjs
Jacco van den Berg 5f37ba6fc4
Add warning if filler plugin is used but not registered (#10702)
* add warning if filler plugin is used but not registered

* fix lint

* increase size limit

* add test, only put warning in dataset controller

* fix register in docs, remove commented code

* remove other mr

* add documentation

* Apply suggestions from code review

Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>

* Also return false if plugin is disabled by options

* improve warning message

* undo docs changes

* update test

Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>
2022-09-26 20:20:54 +02:00

50 lines
1.1 KiB
JavaScript

function modifyWebpackConfig(config) {
config.target = 'web';
return config;
}
module.exports = [
{
path: 'dist/chart.js',
limit: '77.2 KB',
webpack: false,
running: false
},
{
path: 'dist/chart.js',
limit: '34 KB',
import: '{ Chart }',
running: false,
modifyWebpackConfig
},
{
path: 'dist/chart.js',
limit: '19.5 KB',
import: '{ BarController, BubbleController, DoughnutController, LineController, PolarAreaController, PieController, RadarController, ScatterController }',
running: false,
modifyWebpackConfig
},
{
path: 'dist/chart.js',
limit: '14 KB',
import: '{ ArcElement, LineElement, PointElement, BarElement }',
running: false,
modifyWebpackConfig
},
{
path: 'dist/chart.js',
limit: '27.5 KB',
import: '{ Decimation, Filler, Legend, SubTitle, Title, Tooltip }',
running: false,
modifyWebpackConfig
},
{
path: 'dist/chart.js',
limit: '22.4 KB',
import: '{ CategoryScale, LinearScale, LogarithmicScale, RadialLinearScale, TimeScale, TimeSeriesScale }',
running: false,
modifyWebpackConfig
}
]