Skip to content
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

chore: ignore node_modules when using vsce for bundling #170

Merged
merged 8 commits into from Mar 1, 2024

Conversation

bethatguyad
Copy link
Contributor

@bethatguyad bethatguyad commented Feb 27, 2024

Closed #160

@bethatguyad
Copy link
Contributor Author

Before:

image

After

image

@bethatguyad
Copy link
Contributor Author

@sdankel friendly pin, could you please have a look?

@sdankel
Copy link
Member

sdankel commented Feb 28, 2024

@bethatguyad thank you for the contribution! However, I'm pretty sure the dependencies need to be part of the bundle for it to work properly. I'll test this out today. devDependencies are ignored automatically:

https://code.visualstudio.com/api/working-with-extensions/publishing-extension#using-.vscodeignore

We should be ignoring .ts files, as the docs suggest, if you'd like to make that change.

@sdankel
Copy link
Member

sdankel commented Feb 28, 2024

When I tested it, the plugin does not work without node_modules in the bundle.

.vscodeignore Show resolved Hide resolved
sway-vscode-plugin-0.2.16.vsix Outdated Show resolved Hide resolved
@bethatguyad
Copy link
Contributor Author

When I tested it, the plugin does not work without node_modules in the bundle.

Can you try again? Now it works, I use esbuild bundle the client before vsce package.
Now it is only
image

package.json Show resolved Hide resolved
@sdankel
Copy link
Member

sdankel commented Feb 29, 2024

When I tested it, the plugin does not work without node_modules in the bundle.

Can you try again? Now it works, I use esbuild bundle the client before vsce package. Now it is only image

Nice! It works now. With the ts files ignored it's even smaller: 413.96KB

package.json Outdated Show resolved Hide resolved
Copy link
Member

@sdankel sdankel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Happy to approve once my comments are addressed. This seems to make the extension run much faster 🔥

bethatguyad and others added 3 commits March 1, 2024 15:07
Co-authored-by: Sophie Dankel <47993817+sdankel@users.noreply.github.com>
@bethatguyad bethatguyad requested a review from sdankel March 1, 2024 07:22
client/src/client.ts Outdated Show resolved Hide resolved
@sdankel sdankel merged commit f6e7598 into FuelLabs:master Mar 1, 2024
4 checks passed
@bethatguyad bethatguyad deleted the fix/ignore-node-modules branch March 2, 2024 03:59
sdankel added a commit that referenced this pull request Apr 17, 2024
* chore: ignore node_modules when using vsce for bundling

* feat: 🎸 use esbuild instead

* Update .vscodeignore

Co-authored-by: Sophie Dankel <47993817+sdankel@users.noreply.github.com>

* fix: 🐛 address issue

* chore: update docs

* Update client/src/client.ts

---------

Co-authored-by: Sophie Dankel <47993817+sdankel@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Follow recommendations for bundling javascript files
2 participants