I’m trying to use c3.js to add some charts and graphs to my site. I did an npm install c3
and am able to reference c3 in my VM using @import c3 from 'c3'
.
However, the associated .css is not loaded so there are a few quirky display issues.
What is the best way to reference the associated c3.min.css
from the c3 folder of my node_modules
?
- Do I have to copy the .css file locally into my src? (Yuck)
- Do I do an import with a hardcoded reference to the css file:
node_modules\c3\dist\c3.min.css
. (Yuck again) - Do I simply load it from cdnjs in my index.ejs file?
<link rel="stylesheet" href=".../c3.min.css" />
- Given that webpack/node are able to locate c3 without a path when referencing it in my VM (
@import c3 from 'c3'
), is there a way to do the same withcss
?
Thanks for your help