How to use multiple d3 versions in one vue app?

I’m trying to do a visualization by vue. Currently all my .vue files under src > views folder are using the latest version of d3. I’m trying to add a new page but the script is only working in d3 v3 version. How can I import d3 v3 version only to this page? I tried import * as d3 from 'd3'; and it doesn’t work. And I tried to convert the v3 code to the latest version it still has errors. So is there a possible way to use d3 v3 version in one specific .vue file and the other .vue files remain using the latest version?

Source: Vue – Stack Overflow

November 27, 2021
Category : News
Tags: D3.js | javascript | Vue.js

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.