-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Unable to bundle extension with ESBUILD #147551
Comments
similar problem here with a selfmade zowe extension... (1.66.0, win 10). Also esbuild, if "node_modules/" is removed from vscodeignore file it is working like expected (und quite big)... |
Any help please? |
Hm, I'm having trouble reproducing what you're running into following the instructions in the docs. The This section is linked to in the esbuild portion of the docs:
Are there additional repro steps I should use for this? |
@connor4312 ended up here with excluding the needed modules with ! in the vscodeignore file |
@kraabrsg I don't think you're running into the same issue as the author. If you use esbuild, |
Thanks @connor4312 I was wondering the same
|
Could this be related to esbuild's inability to process dynamic imports evanw/esbuild#700 ? When I add |
You still want the ignore file to omit your node_modules, sources, and so on.
Yes, as the message says, it won't bundle that statement. Dynamic require statements are incompatible with most bundlers.
Many of our new extensions use esbuild, e.g. the built-in notebook renderers extension |
@connor4312 well it is exactly the same case. |
Is there a way to explicitly include a glob pattern e.g. |
Yea, you can add negations after you ignore something, like
This works the same as a
I don't have enough info from what you posted to provide advice. Usually you'll get warnings or errors from your bundler if it can't resolve and import, such as what Mohan posted. Unless you import things in esoteric ways that the bundler doesn't know to look for. Otherwise, it's expected that you'll get a single static file (or set of files, depending on your configuration) that can be consumed without |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
Solution turned out to be adding out/ and node_modules/ to .vscodeignore. Docs are just a little confusing in terms of what steps are for webpack and which steps are for esbuild.
node_modules/
to my.vscodeignore
my extension now bundles.DONE Packaged: D:\Projects\VSCODE_Extensions\kodi-localize\kodi-localize-0.1.3.vsix (11 files, 86.44KB)
However the issue is my extension no longer activates or runs, before bundling the extension works fine.
The text was updated successfully, but these errors were encountered: