Importing additionnal libraries
raizam opened this issue · 1 comments
raizam commented
Hi,
I'm trying to add d3.js to the template, so I did:
npm install --save d3
npm install --save-dev @types/d3
then I've imported d3 typings using import d3 from 'd3';
It does compile, but d3.js doesn't get included in the bundle.
I tried to find out how vuejs files are added, but there isn't any explicit reference in the webpack config files, my guess is that awesome-typescript-loader is smart and knows how to retrieve them.
Same with axios, typings and js are resolved without explicit references in config.
My guess is that the problem comes from the fact d3 typings and js are 2 different npm modules.
I need some directions because I'm stuck :)
raizam commented
ok, I could fix the issue, I was using the wrong import statement, here is the correct one:
import * as d3 from 'd3';