VSCode extension runs from development but does not work when packaged using webpack

荒凉一梦 提交于 2021-01-29 07:35:15

问题


I've built, run, packaged, and published an extension but the packager complains about 2509 files, 4.28MB and suggested using a bundler. I've followed the instructions on Bundling Extension and finally got it to build and run in my development environment using the extensionHost.

After publishing this new package (14 files, 303.51KB) I find that while my contributed viewContainer and views are visible, it appears that my activate() function is never called. I've put vscode.window.showInformationMessage() and it shows up fine with the extensionHost but not when installed from a .vsix. I've looked at dist/extension.js and confirmed that my code is present, so it isn't exactly that webpack is missing something.

The code can be found here. I'd really appreciate any advice. Why would webpack work in development but not in a vsce package? Thanks!

来源:https://stackoverflow.com/questions/56712315/vscode-extension-runs-from-development-but-does-not-work-when-packaged-using-web

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!