-
Notifications
You must be signed in to change notification settings - Fork 164
Description
In the README and in our samples, we reference chart.js and moment.js through our library with the _content directory added by blazor. It's included in the sources of this library and is automatically integrated into the client-side root of applications that consume this library.
But why?
We can write what version of chart.js we currently support and we can let the consumer chose themselfs how to include the chart.js. We can also let them chose if they want the minified version or not. Why should we include the JavaScript-file of chart.js in our library as well, doesn't it just bloat the nuget size?
It would be a breaking change to remove it but here's why I think it would make sense.
Pro
- Smaller nuget-size
- We can keep the type files for TypeScript, no need to change that
- When we migrate to chart.js 3.0, we'll have trouble with the time-adapters anyway. You don't need moment.js anymore, you can use any time-adapter you want. So which one would we have in our library?
- More flexible for the consumer (minified, version, cdn)
- Only the script tag in the
_Host.cshtmlorindex.htmlwould change in the consumers application
Contra
- Breaking change, consumers need to change some code
- We need to clearly document what version we support and be aware of it (this is actually a benefit IMO but it requires additional work)
If possible, I would like to hear some opinions on this before we decide anything. Can anyone tell us some good arguments for keeping it in? Or do you agree with me that it should be excluded from the project and just be documented well?