Skip to content

Conversation

@EzraBrooks
Copy link
Collaborator

Allow users' package managers to satisfy our dependencies, instead of bundling them all in our compiled output.

(this is like dynamic linking as opposed to static linking for JS)

As an aside, the question now becomes "why use a bundler like Vite at all now when we're not really 'bundling' anything?". Why indeed? I ported us to Vite to replace a bunch of old tooling, but maybe we don't even need Vite in the long term since the JavaScript module-importing ecosystem is far more mature than it once was.

Base automatically changed from finally-break-module-api to develop November 12, 2025 01:04
@EzraBrooks EzraBrooks force-pushed the stop-bundling-dependencies branch from e6d48cb to a7f15ba Compare November 12, 2025 03:33
@EzraBrooks
Copy link
Collaborator Author

We've already been forcing all our package-manager-using users to download all our dependencies, and then we weren't actually using them. This PR takes our compiled library size down from over 300kB to less than 70kB. As I mentioned in #1056, CDN users (however many of them will actually migrate to 2.0, given that CDN-based JS usage is pretty old-fashioned) will just need to set up an import map - which is not unlike how we used to tell users to grab EventEmitter from a CDN in addition to grabbing roslibjs.

@EzraBrooks EzraBrooks marked this pull request as ready for review November 12, 2025 15:30
Allow users' package managers to satisfy our dependencies,
instead of bundling them all in our compiled output.

(this is like dynamic linking as opposed to static linking for JS)
@EzraBrooks EzraBrooks force-pushed the stop-bundling-dependencies branch from a7f15ba to d80b3f0 Compare November 12, 2025 16:23
@bjsowa
Copy link
Member

bjsowa commented Nov 12, 2025

@Krzemien97 Does this affect us in any way?

@EzraBrooks
Copy link
Collaborator Author

As long as you guys are installing via a package manager like npm, pnpm, yarn, etc. and are using an ESM-compatible build tool (basically all of them at this point), it shouldn't.

@EzraBrooks EzraBrooks merged commit 331d20d into develop Nov 12, 2025
13 checks passed
@EzraBrooks EzraBrooks deleted the stop-bundling-dependencies branch November 12, 2025 22:04
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.

3 participants