I've installed Chart.js via npm:
npm install chart.js --save
After that, in
resources/assets/js/bootstrap.js I added:
and after running the
gulp command - everything works fine. My question is - what I am requiring with
node_modules. Concretely, I see that now there is
chart.js directory inside
chart.js contains many other directories/files.
Now, I know that Chart.js provides two different builds that are available for use:
The Chart.js and Chart.min.js files include Chart.js and the accompanying color parsing library. If this version is used and you require the use of the time axis, Moment.js will need to be included before Chart.js. The Chart.bundle.js and Chart.bundle.min.js builds include Moment.js in a single file. This version should be used if you require time axes and want a single file to include, select this version. Do not use this build if your application already includes Moment.js. If you do, Moment.js will be included twice, increasing the page load time and potentially introducing version issues.
and I see that there are all of these builds (Chart.js, Chart.min.js, Chart.bundle.js and Chart.bundle.min.js) in the
So, when I run
gulp - which one of these will be used for generating a single bundled file in the