What does work is having the 'import * as d3 from 'location of d3.js file' in my case it was 'import * from '../d3/d3.js'' in the main.js.
autocmd InsertEnter <buffer> :1 :s /^\/\/ import \* as d3 from\>/import \* as d3 from/e
autocmd BufWrite <buffer> :1 :s /^import \* as d3 from\>/\/\/ import \* as d3 from/e | ''
The 'e' at the end ignores errors if already commented out and the ( | ''), two single quotes, will return your cursor back to your previous line after execution.
Pretty new at this. No, not doing any bundling. I work on my main.js file which is referenced in my index.html.
I've been reading a bit on bundling though. I do have nodejs and npm installed on my machine now. Just reading on where to go from here. I see that I need to do a 'npm init' to get my package.json initialized...from there I am still reading.
If you’re not bundling, I would recommend using completion based on your path. For more info about setting the path in vim, I recommend this article.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.