Centralized Dependency Management

Every time we create a new project/chat, we have to re-install all the dependencies (e.g., npm packages, React, CSS frameworks, etc.) for each project.
It would be cool if you can include a centralized or shared dependency management system.
Shared Dependency Cache: A global cache for commonly used dependencies that can be referenced across projects.

1 Like

well, what about dependency issues due to different version that might be required? maybe more in the spirit of “every prj has its own” but it just links to a central cache to link to the corresponding version to (shared dependency cache)? that’d perhaps greatly speed up init.

I agree with max2veg that its bit tricky.

But may be one thing that does come to mind,
We can fork chats or reload them.
But each time we do it reinstalls all the dependencies again.
May be in theory we can have cache for that.
npm install would still be run but against node_modules loaded from cache so it should be faster.

But reusing same node_modules for multiple projects would work only if projects are more or less the same.

It would be nice to be able to have a local repo for these files (could be considered a cache per se) so that we can point ottodev to pull from these local repos instead of consistently validating them online/downloading the dependencies every time.

If you mean local folder then that will not work.
Bolt projects run in WebContainer environment that differs from your local one. You local folder and what is in webcontaienrs need different node_modules.

ultimately what I’m looking to do is to have bolt look at a local resource for the manifest files/resources that it wants to install into the web container.

For example I want to have a local copy of the version of npm/vite/pydantic/[insert library or module commonly installed in the web container] so that bolt doesn’t have to find/download the resources from the internet but can use the local copy.

What do you mean by local manifest? Local manifest is already local, its indexdb in your browser cache. Already local.
Its in pckage.json file of your project in indexdb that is local.

I think what you mean is that what it installs should also be locally cached in browser cache right?