I have a monorepo with my VS Code extension code located in the vs-code-extension folder:
.
├── website
├── vs-code-extension
└── shared
I am trying to access code from the shared folder inside the code in vs-code-extension. The extension code is mostly the default that is auto-generated when the project is initially built. The only notable change that I have made is the addition of an import statement to a file from the shared folder inside the extension.ts and the addition of a reference to the tsconfig.json file as follows:
"references": [
{ "path": "../shared" }
],
As a result, the extension starts just fine, however upon trying to execute the helloWorld command, I get the following error:
command 'my-project-name.helloWorld' not found
Upon removing the import statement to the shared folder's file in extension.ts - this error disappears.
My question here is if it is possible to reference code from outside the extension directory, and if so what would be the way to do it.