-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"markdown-it-wikilinks" dependency is not packed #101
Comments
Oh, I forgot a few things. VS Code ignores broken extensions: So, you won't see that error message, until you tweak its logic, for example: try {
md = (await plugin)(md);
} catch (err) {
console.error(err);
} Besides, VS Code's built-in Markdown preview also reveals that your markdown-it plugin contribution is not working. Additionally, |
Ahh, great catch. I will fix this weekend! |
Thank you for such detail on this issue, @Lemmingh -- a model citizen! I am just reading through the rest of your thread -- re: "built-in Markdown preview also reveals that your markdown-it plugin contribution is not working" is there something else beyond packaging the dependency that you noticed? I implemented your suggested fix in #104 and it seems to render OK now, but just wanted to make sure I didn't miss something. |
Looks good to me. I guess there's no more to do with your extension.
Nothing critical in that comment. I was just talking about the background in different ways. As you know, VS Code's Thus, to add a plugin ( To check whether it is packed, inspecting the VSIX package directly, or running Then to check whether it works, looking at the Markdown preview is often enough. But when something goes wrong, we will have to attach a debugger and look for errors. That's all. |
To Reproduce
Install version 0.0.20.
Restart VS Code, and open a Markdown document.
See Developer Tools > Console:
Behind the scene
Unzip
vscode-markdown-notes-0.0.20.vsix
.In
out/MarkdownRenderingPlugin.js
, at line 50:But
node_modules/@thomaskoppelaar/markdown-it-wikilinks/
does not exist, so this statement will crash.The reason is as follows.
By default, vsce packs production dependencies, unless you exclude them.
However,
markdown-it-wikilinks
is not there:It is under dev dependencies currently:
vscode-markdown-notes/package.json
Line 219 in 431084c
Versions
Possible solution
Move
@thomaskoppelaar/markdown-it-wikilinks
to production dependencies:The text was updated successfully, but these errors were encountered: