How to Code a VSCode Extension
Why Stack Overflow recommends it
Stack Overflow users link it as the walkthrough they followed when building VSCode extensions with Svelte webviews and sidebars, then cite it when asking for help with packaging, loading and message posting.
Recommended by 0 people across 0 different months, 2021 to 2022.
What it is
A 3.5 hour tutorial by Ben Awad that builds a VSCode extension from scratch: custom commands, webviews and a sidebar written in Svelte, message passing between extension and webview, plus an Express and TypeORM backend with GitHub OAuth and a todo CRUD feature. The code is published on GitHub and timestamps mark each section.
What people said
Cites MehakMehta · 2021-05 · Stack Overflow · on “Extension's content doesn't load after publishing”
@LexLi Thanks for this! But I feel there isn't a problem with package.config or adding .vscodeignore(I already had it added). I feel that there is a problem in activating the sidebar itself because in production the commands are working fine expect the sidebar(I hope I make sense). Have you made an extension that has a sidebar or know someone that has? I was following [this video] this but the guy didn't deploy the extension so I got confused :/
Cites Tanmay Bairagi · 2021-08 · Stack Overflow · on “How to resolve: "Uncaught ReferenceError: require$$0 is not defined" in svelte in vs code extension development”
I am creating vs code extension using svelte. I followed this [this video] to understand some basics of svelte. I am currently stuck with the error Uncaught ReferenceError: require$$0 is not defined . This error shows inside an automatically created file, named sidebar.js (created in "project"/out/compiled folder) when I import import * as fs from "fs"; and use this fs to read a file existing in the local machine. Below is the file structure of this project - [LINK] I am also getting a warning in my npm run watch when I try to import this fs in Sidebar.svelte (full code below) which is- [LINK] What I want to do here is- I want to load the file LoadedProjLocations.json into the file Sidebar.svelte
Cites Tanmay Bairagi · 2021-08 · Stack Overflow · on “How to resolve: "Uncaught ReferenceError: require$$0 is not defined" in svelte in vs code extension development”
Thanks for looking into it Stephane Vanraes. I found another solution for this. I actually could get the file into my extension.ts file. so I took the data into a variable and sent it to the svelte file through message posting. I took the reference form [this video] here for this.
Cites GauravRG · 2022-11 · Stack Overflow · on “vscode extension development: svelte content not loading in webview after building the vscode extension”
I am building a vscode extension by using svelte for webview. I am following [this video] . But the deployment of extension is not mentioned in the tutorial . So i am following [LINK] . So after packaging the extension with vsce package and installing the extension the extension doesn't load svelte content but when running in developer mode everything works fine. I tried creating the package extension multiple Times but still didn't work.