vscode扩展代码在NPM工作区中

发布于 2025-01-27 02:01:42 字数 549 浏览 3 评论 0原文

我在NPM Workspaces Monorepo中编写VS代码扩展 当我尝试使用vsce软件包进行包装时,我会收到此错误:

This extension consists of <files_count> files, out of which <files_count> are JavaScript files. For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension . You should also exclude unnecessary files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore

我已经在使用.vscodeignore文件,看来vsce package命令试图获取文件在MonorePo内部的项目文件夹之外,

我的目标是获取仅包含扩展代码的.vSix文件

Im writing a vs code extension inside npm workspaces monorepo,
when I try to package it using vsce package, I get this error:

This extension consists of <files_count> files, out of which <files_count> are JavaScript files. For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension . You should also exclude unnecessary files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore

I'm already using the .vscodeignore file, it seems that the vsce package command trying to get files outside the project folder inside the monorepo

my goal is to get the .vsix file that include only the extension code

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

池木 2025-02-03 02:01:42

我发现我必须忽略每个父级。运行vsce ls以确保剩下的文件是您要发布的文件:

# /workspaces/vscode-theme/.vscodeignore

../../**
../**

I found I had to ignore each parent level. Run vsce ls to make sure the files left are the ones you'd like to publish:

# /workspaces/vscode-theme/.vscodeignore

../../**
../**
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文